Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Comparing Two different dates | PowerBI

hi, I want to compare two different dates from the same tables   Example: Below is my table Meter date Cost ADB 12-6-2022 23.45 ADF 12-6-2022 34.56 Storage 12-6-2022 14.56 ...
  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    4 years ago

    Hi Anonymous ,

     

    Create a new table for user to select the previous date via PreviousDate = VALUES('Table'[date])

     

    Then use this measure to get the values of previous date.

    PreviousCost = CALCULATE(SUM('Table'[Cost]),'Table'[date]=SELECTEDVALUE(PreviousDate[date]))
     
    Reault:

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

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