Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Total problem with SAMEPERIODLASTYEAR

I have been struggling for some time now with this small&easy(?) problem..  ☹️  Measure: Diff sales between years = IF (     ISBLANK([Total sales last year]);     BLANK();     [Total sales (SU...
  • v-easonf-msft's avatar
    v-easonf-msft
    6 years ago

    Hi , Anonymous

    Not very clear .

    Maybe what you need is a formula like this:

     

    2Diff sales between years = SUMX(DISTINCT('Date'[Date]),
    IF (
        ISBLANK([Total sales last year]),
        BLANK(),
        [Total sales] - [Total sales last year]
    ))

    Here is a demo.

    Pbix attached

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.