Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX - Return 2 rows of a column with a lookup

Community,

In table1 below I have a CASE ID column and a CASE ID REF column.

CONNECTED TABLE 1.JPG

 

 

 

 

In table1 CASE ID REF represents the CASE ID that we would like the compare the CASE ID in that row to.

 

I would like to have a measure that returns the both the CASE ID's of both numbers referenced in the row (CASE ID and CASE ID REF).

 

Example:

IF I were to filter on CASE ID 2 in Table1, I would like to have a measure that returns the CASE ID and the corresponding CASE ID of the CASE ID REF, such that it would return:

CASE ID

1

 

Any help is appreciated!!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Tricky-Slicer-Options/m-p/573381#M270846

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/Tricky-Slicer-Options/m-p/573381#M270846

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Cmcmahan
Resident Rockstar
Resident Rockstar

Measures can only return 1 value, by design.  You can easily set up two measures that return each value, or a measure that returns both values as a concatenated string, but not 2 values.

 

ConcatenateIDandREF = SELECTEDVALUE(table1[CASE ID]) &" : "& SELECTEDVALUE(table1[CASE ID REF])

This will return "2 : 1" if you filter on CASE ID = 2. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.