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.
Looking for the most straightforward way to calculate the max of an aggregated measure (Measure A) added to a table column by row MonthYear? MonthYear is from a calendar table, connected to the fact table by a one to many relationship on date.
Something like the following -
Hi @Russ ,
You may create measure like DAX below.
Max Measure A= CALCULATE(MAXX('Fact Table', [Measure A]), FILTER(ALLSELECTED(Calendar), YEAR(Calendar[Date])=YEAR(MAX(Calendar[Date]))))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Russ ,
You can also try,
Measure = CALCULATE (MAX(Table[MeasureA]),ALL(Table))
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@Russ , try like
calculate(maxx(values(Table[MonthYear]),[Measure]),all(Table))
Many thanks, @amitchandak @harshnathani @v-xicai , for the replies.
@amitchandak , solution works fine.
@harshnathani, could not get your solution to work as Max function will only accept table column, not a measure.
@v-xicai , solution gives a range of results, depending on row context.
Hi @Russ ,
Yes, the MAX function will only accept table column, while the measure can be used in MAXX function instead of MAX function.
Best Regards,
Amy
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 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |