Using RELATED function in DAX with USERELATIONSHIP

0 votes
I get the error:

The column 'People[FullName]' either doesn't exist or doesn't have a relationship to any table available in the current context.

I am trying to pull in a field from another table in my BISM model using the "RELATED" function. Since there are many tables that have relationship to the People table, only ONE relationship is active and the rest are inactive. In this case, the relationship is Inactive, and as I understand it I am to use the "USERELATIONSHIP" function to specify the relationship to use.
Nov 18, 2020 in Power BI by anonymous
• 8,910 points
4,417 views

1 answer to this question.

0 votes

Here's an example using the AdventureWorksDW data set...

EVALUATE(
    CALCULATETABLE(
        ADDCOLUMNS(
            'Internet Sales'
            ,"Order Calendar Year"
                ,CALCULATE(VALUES('Date'[Calendar Year]))
            ,"Ship Calendar Year"
                ,CALCULATE(
                    VALUES('Date'[Calendar Year])
                    ,FILTER(
                         'Date'
                        ,'Date'[DateKey] = 'Internet Sales'[ShipDateKey]
                    )
                )
            ,"Due Calendar Year"
                ,CALCULATE(
                     VALUES('Date'[Calendar Year])
                    ,FILTER(
                         'Date'
                        ,'Date'[DateKey] = 'Internet Sales'[DueDateKey]
                    )
                )
        )
    )
)

This code pulls in Calendar Year from the Date table to the Internet Sales table for each of the dates in the Internet Sales table:

  • Order Date (active relationship)
  • Due Date (inactive relationships)
  • Ship Date (inactive relationships)

EDIT: corrected first response (above)...Here's a good write up of why USERRELATIONSHIP won't work in this scenario: 

The LOOKUPVALUE below works as well:

=LOOKUPVALUE(
     People[FullName]
    ,People[PersonID]
    ,FollowUps[OwnerID]
)
answered Nov 18, 2020 by anonymous
• 65,910 points

Related Questions In Power BI

0 votes
1 answer

list reports with calculated percentage in Power BI using dax

Create a Measure called Total Revenue: Total Revenue = SUMX( ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,570 points
1,361 views
0 votes
1 answer

How to rename a column using DAX in Power BI?

Hi Ramya, I found these two function that ...READ MORE

answered Aug 22, 2019 in Power BI by anonymous
• 33,030 points

edited Dec 31, 2021 by Soumya 33,285 views
0 votes
1 answer

Left Outer Join using DAX in PowerBI.

You can simply write a few measures ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
1,395 views
0 votes
1 answer

How do I count rows in one table based on values in another table using DAX?

If the tables are related, this is ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
21,736 views
0 votes
1 answer

Using DAX calculation how to calculate monthly budget till today in power bi Desktop?

You can make use of this: MTD Budget ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
1,560 views
0 votes
1 answer

Understanding the DAX CALCULATE function

Using the CALCULATE function makes the DAX perform a context ...READ MORE

answered Sep 28, 2020 in Power BI by Gitika
• 65,910 points
1,285 views
0 votes
1 answer

DAX Userelationship function

 You need a way for the measure ...READ MORE

answered Oct 5, 2020 in Power BI by Gitika
• 65,910 points
845 views
0 votes
1 answer

How to restart running total column with Power BI Desktop DAX?

This is not only a running total ...READ MORE

answered Dec 8, 2020 in Power BI by Gitika
• 65,910 points
1,629 views
0 votes
1 answer

Calculate GB Using DAX in Power BI

Hi, @Vnk You can go through this regarding ...READ MORE

answered Jun 30, 2020 in Power BI by Gitika
• 65,910 points
4,100 views
0 votes
1 answer

DAX Calculate function with and without FILTER

You could make [Measure12] return the same results as ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
3,375 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP