Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

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

  • Anonymous's avatar
    Anonymous
    Not 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.

      • Anonymous's avatar
        Anonymous
        Not 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. :(
         
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi

       

      Thanks for your reply, but I don't see how this post helps me to resolve my DAX formula issue.