Max date per quarter and extra category


#1

Hi Sam,

I have a data set that i want to show in Power BI and i need to take the max date and show it in 1 row. How can i write the formula in DAX to have the max date taking into account 2 different criterias (Bonus_Id and Quarter)?
When i use max date, it get the max date of all the column:
Max_date=max(updates_src)
*update_src is the update date from the source
Please see the screenshots of the data and how it looks in Power BI


Thanks in advance


#2

It’s very important to know what context you want this in.

That will determine what formula you ultimately need and that is how you need to think about this problem.

If the context is Bonus IS and Quarter, then really all you need to use is MAX( Udates_src)

If not then you will need to alter this formula somehow. Usually by wrapping this in CALCULATE.

Also if you want to find other data only for that max date then you need to use a pattern like this.

CALCULATE( Measure,
FILTER( ALL( dates ), Datecolumn = [Max Date] )