Forum Discussion

Joey2022's avatar
Joey2022
Regular Visitor
4 years ago
Solved

Calculated column to show difference value btw rows

Hi there!  I need a favor from you guys, experts. I stucked in the matter for weeks. Pls kindly help me out. The matter is: I want to find the difference value of sale btw 2 days as: Date Sal...
  • Ashish_Mathur's avatar
    4 years ago

    Hi,

    Try this

    1. Create a Calendar Table and build a relationship from the Date column of your Data Table to the Date column of the Calendar Table
    2. To your visual, drag Date from the Calendar Table.
    3. Write these measures:

    Sales = sum(Data[SaleAmount])

    Previous day sales = calculate([Sales],previousday(Calendar[Date]))

    Delta = [Sales]-[Previous day sales]

    Hope this helps.

  • Ashish_Mathur's avatar
    Ashish_Mathur
    4 years ago

    Hi,

    You may download my PBI file from here.