Forum Discussion
JamesBurke
2 years agoHelper III
Max Month -1
Hi , Max Month Usages = Var MaxMonthValue = CALCULATE(MAX('Date'[Year Month Number]) , FILTER('Date',[UsagesCount] >= 1)) RETURN CALCULATE([Total Kwh],'Date'[Year Month Number] = MaxMonthVal...
JamesBurke
2 years agoHelper III
Anonymous
Max Month Usages =
Var MaxMonthValue =
CALCULATE(
MAX('Date'[Year Month Number new]) ,
FILTER('Date',[UsagesCount] >= 1),
ALL('Date'))
RETURN
CALCULATE(
[Total Kwh],'Date'[Year Month Number new] = MaxMonthValue)
Max Month Usages -1 =
Var MaxMonthValue =
CALCULATE(
MAX('Date'[Year Month Number new])-1 ,
FILTER('Date',[UsagesCount] >= 1),
ALL('Date'))
RETURN
CALCULATE(
[Total Kwh],'Date'[Year Month Number new] = MaxMonthValue)
This still returns Blank when selecting on a specfic month for some reason
Anonymous
2 years agoNot applicable
JamesBurke ,
Please try this:
Max Month Usages -1 =
VAR MaxMonthValue = MAX('Date'[Year Month Number new])-1 ,
RETURN
CALCULATE([Total Kwh],'Date'[Year Month Number new] = MaxMonthValue)
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group