Forum Discussion

SaraVM's avatar
SaraVM
Regular Visitor
6 years ago
Solved

Compare Same Week Last Year Per Category

Hi all,    I've been trying to work out how to compare values of visits per market for the same week last year but nothing seems to work.    1. I have a Calendar date table on DAX 2. It's linked...
  • Icey's avatar
    Icey
    6 years ago

    Hi SaraVM ,

     

    Please try this:

    Total Visits VOL = SUM ( IntMarkets[Total Visits] )
    Total Visits LY = 
    VAR ThisYear =
        MAX ( IntMarkets[Year] )
    VAR LastYear = ThisYear - 1
    RETURN
        CALCULATE ( [Total Visits VOL], IntMarkets[Year] = LastYear )
    

    For more details, please check the attached PBIX file.

     

     

    Best Regards,

    Icey

     

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