Forum Discussion
Calculate Difference Between Dates in the same Column and the %
Hi
I am new to Power Bi, I have a problem and hope someone will be so kind to help:
I need to calculate a variance of the Sales (Column C) by Region (Column A) between the two years (Column B)
8 Replies
- AnonymousNot applicable
Sorry, clicked on the Post button by accident and don't know how to edit the post.
... and I also need to calculate the %.
Any help would be greatly appreciated.
- Gordonlilj
Solution Sage
Hi,
You could try the solution provided here and see if it works for you
How to create variance field and variance %
- AnonymousNot applicable
Hi
Thanks for the link, I used the formula below:
_Sales Variance = CALCULATE(SUM(Data[Sales_value £k]),FILTER(Data,'Data'[fiscal_year]=2018-19))-CALCULATE(SUM(Data[Sales_value £k]),FILTER(Data,'Data'[fiscal_year]=2017-18))But an error message:MdxScript(Modell) (10 80) Calculation error in measure 'Data'[_sales variance]:DAX comparison operations do not support comparing values of type text with values of type integer. Consider using the Value or Format funciton to convert one of the values.Please Help, I am really struggling. :(
- v-chuncz-msft
Community Support
Anonymous ,
You may refer to the following post.
https://community.powerbi.com/t5/Desktop/Students-variations-year-over-year/m-p/345749#M155124
- AnonymousNot applicable
Hi
Thanks for your reply, but I don't see how this post helps me to resolve my DAX formula issue.