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
Anonymous
Not applicable

How to compare calumn value with measure value in visual?

Hello everyone @Greg_Deckler ,

I am looking for a way to dynamically compare two values in a table.

Luca1234_0-1636016158440.png

 

But the LASTMODIFIED value is a column in my dataset and the LatestResult value is calculated measure using this formula:

 
LatestResult =
var MaxDate = CALCULATE(MAXX(RESULT,RESULT[LASTMODIFIED]),
ALLEXCEPT(RESULT,[TC_UUID]))
return MaxDate
 
What I want is to modify the formula above so it doesnt show max date anymore but TRUE or FALSE or 0/1 to show if it is the LatestResult or not.
How can I achieve this? The goal is to later be able to filter out the older results in a PieChart for example, thats why it has do be done dynamically with a measure and not PowerQuery or Calculated Columns.

 

1 ACCEPTED SOLUTION

@Anonymous Should be IF(LatestDate = MAX([LASTMODIFIED],TRUE(),FALSE())

 

If this is in a table visual.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

So for specification I need something like this:

Luca1234_0-1636016711814.png

But I dont know how to reference the LASTMODIFIED column...

Thanks upfront to everyone.

@Anonymous Should be IF(LatestDate = MAX([LASTMODIFIED],TRUE(),FALSE())

 

If this is in a table visual.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

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.