'Get most recent month name with Power BI measure?

I have 2 columns, Status and Date. The "Status" column contains three values ('Past Due', 'Soon Due', 'Calibrated').

I would like to display the most recent month name calculated for each of these status categories separately. Specifically, I would like to create a table visual where we have 3 different columns with the names "Past Due", "Soon Due", and "Calibrated". These columns display the most recent month name for dates corresponding to each status category, as outlined in the screenshots below.

Sample Input:

Input Table

Desired Output:

Output Table



Solution 1:[1]

FORMAT([DateField], "MMM") is the key DAX function here.

I've outlined the 3 measures below that should give you the result you want. Replace "Table1" with your table name.

Past Due

Past Due = CALCULATE(FORMAT(MAX(Table1[Date]), "MMM"), Table1[Status] = "Past Due")

Soon Due

Soon Due = CALCULATE(FORMAT(MAX(Table1[Date]), "MMM"), Table1[Status] = "Soon Due")

Calibrated

Calibrated = CALCULATE(FORMAT(MAX(Table1[Date]), "MMM"), Table1[Status] = "Calibrated")

Measures in Table

Result Table

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matt Kocak