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

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!:
The Definitive Guide to Power Query (M)

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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.