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.
hello,
I'm trying to create a measure which should retun the max of a value in the selected time period and also return the corresponding date on which that max value appeared.
Below is the screenshot of the sample data and highlighted row is the outcome I expect as separate measures.
The time period selected is Jan 2019. I was able to create a measure to return the max of value but not able to get the corresponding date. Please help! Thank you!
Solved! Go to Solution.
Assuming you have a date table, you can do the following:
Max = max (Table1[Value] )
Date of Max = Var __SelectedMax = CALCULATE( MAX( Table1[Value]), ALLSELECTED(DimDate) ) RETURN CALCULATE( VALUES(DimDate[Date]), FILTER( ALL( DimDate), [Max] = __SelectedMax ) )
and if you are so inclined you can put it all together for a card:
Measure for a Card = "Max of "&[Max]&" Occured on "& [Date of Max]
Thanks a lot for the solution. It served my purpose as well.
Try this calculated measure:
Assuming you have a date table, you can do the following:
Max = max (Table1[Value] )
Date of Max = Var __SelectedMax = CALCULATE( MAX( Table1[Value]), ALLSELECTED(DimDate) ) RETURN CALCULATE( VALUES(DimDate[Date]), FILTER( ALL( DimDate), [Max] = __SelectedMax ) )
and if you are so inclined you can put it all together for a card:
Measure for a Card = "Max of "&[Max]&" Occured on "& [Date of Max]
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |