Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Combine two different date DATA in one Graphic

Hello Guys,   I need to combine two different date DATA in one graphic. Everyday i compare the data of yesterday with the same day but in W-1. Example : i compared monday 25th of november with Mo...
  • v-xicai's avatar
    6 years ago

    Hi Anonymous ,

     

    You can create calendar table like DAX below, then create relationship between your fact data table and calendar table on date field.

     

    Calendar = CALENDAR(MIN(data[Date]),MAX(data[Date]))  
     
    Or
     
    Calendar =CALENDARAUTO() 

     

    Then you can create measure using calendar[Date].

     

    Total last week = CALCULATE(SUM(data[value]),DATEADD(Calendar[Date],-7,DAY))

     

    Best Regards,

    Amy

     

    Community Support Team _ Amy

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