cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

dax max of not working

Each month I am updating my spreadsheet with the latest actuals + forecast for the remainder of the year by month. I use a "Forecast Month" column to indicate which month's forecast the data is from. So for example, we are in November now so I have 10 forecasts (Jan - Oct), the latest one being October 2017. 

 

I want to tag months in my spreadsheet as either historical or forecast based on when the month is relative to my most recent forecast (i.e. September 2017 would be historical but December would be forecast). I'm trying to use a simple calculated column formula to do this but Power BI does not recognize MAX... what am I missing here? 

 

Month Type = if [MonYr] <= MAX([PE FC MoYr]) then "Historical" else "Forecast"

1 REPLY 1
v-huizhn-msft
Microsoft
Microsoft

Hi @Anonymous,

What's the data type and format of [MonYr] and [PE FC MoYr]? MAX function is only used to number values, which evaluates a single column that contains numeric values, if the column contains no numbers, MAX returns a blank. Please review this blog for more details. Please share your sample data structure for further analysis.

Best Regards,
Angelia

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors