Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I am trying to write a Dax for a New Measure to display or filter the most recent entry for a Class (this is entered many times) and the Current class Number ( again entered many times and can change) but needing the most recent number.
Here is a look at My Data
as you can see I may have a class (115-23) with the Current # of agents entered several times I need to display only the most recent number of agents for each class Number.
I have this but it only gets part of the way I cant get past the if Statement if the expression is true..
Is most recent =
var CurrentClassNumber= 'Form Data'[Class Number ]
var mostRecentDate = CALCULATE(MAX('Form Data'[Entry Date]),ALL('Form Data'),'Form Data'[Class Number ] = CurrentClassNumber)
return
IF('Form Data'[Entry Date] = mostRecentDate,"","0")
Any help would be great I am a relitivly new user comeing from Excel and hitting road blocks.
Solved! Go to Solution.
Hi @HeatherBisher ,
According to your statement, I think your requirement is to show data on most recent date each class number. Here I suggest you to filter your visual by measure in visual level filter.
Is most recent =
VAR CurrentClassNumber =
MAX ( 'Form Data'[Class Number] )
VAR mostRecentDate =
CALCULATE (
MAX ( 'Form Data'[Entry Date] ),
ALL ( 'Form Data' ),
'Form Data'[Class Number] = CurrentClassNumber
)
RETURN
IF ( MAX ( 'Form Data'[Entry Date] ) = mostRecentDate, 1, 0 )
Add this measure into visual level filter and set it to show items when value = 1.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @HeatherBisher ,
According to your statement, I think your requirement is to show data on most recent date each class number. Here I suggest you to filter your visual by measure in visual level filter.
Is most recent =
VAR CurrentClassNumber =
MAX ( 'Form Data'[Class Number] )
VAR mostRecentDate =
CALCULATE (
MAX ( 'Form Data'[Entry Date] ),
ALL ( 'Form Data' ),
'Form Data'[Class Number] = CurrentClassNumber
)
RETURN
IF ( MAX ( 'Form Data'[Entry Date] ) = mostRecentDate, 1, 0 )
Add this measure into visual level filter and set it to show items when value = 1.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |