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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
xandurr
Frequent Visitor

Assign the value in Column 2 to a measure based on the value of Column 1.

I have a table with 2 columns.

How can i assign the value in Column 2 to a measure based on the value of Column 1.

AKA, what is the DAX equivalent of the below SQL code

 

SELECT column2

FROM table

WHERE column1 = 'ThisValue'

2 REPLIES 2
v-sihou-msft
Employee
Employee

@xandurr

 

You may create a measure like below; 

 

Measure =
IF ( MAX ( Table[Column1] ) = "ThisValue", MAX ( Table[Column2] ), BLANK () )

Regards,

Sadly that does not work as the value is not the max value.

And it then selects the incorrect value in the script

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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