Forum Discussion
Power_steffi
3 years agoRegular Visitor
Previous Year empty values
I'm trying to calculate the sales for the previous year in Power BI using DAX formulas, but all the formulas that I've tried are giving me blank values. I wanted to calculate the growth but I realize...
Anonymous
3 years agoNot applicable
Hi Power_steffi ,
I think you can try ALL() function in your calculation. Your measure should look like as below.
Sales Previous Year =
CALCULATE (
[Total Sales],
FILTER (
ALL ( raw ),
raw[Year]
= MAX ( raw[Year] ) - 1
&& raw[Quarter] = MAX ( raw[Quarter] )
&& raw[Month] = MAX ( raw[Month] )
)
)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.