Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Percent difference calculation using different values

Hi there!   I am looking for some help with my dax: I have a very simplified dataset and I want to calculate the percent difference (V2-V1)/V1 . I would like a way to calculate the percent differe...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Anonymous ,

     

    You can try dax like below:

     

    M1 =
    VAR cur =
        IF (
            NOT ISBLANK ( SELECTEDVALUE ( slice[tag] ) ),
            SELECTEDVALUE ( slice[value] ),
            BLANK ()
        )
    RETURN
        ( MAX ( 'Table'[Bananas Eaten] ) - cur ) / cur

     

     

    Best Regards,
    Adamk Kong

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly