Forum Discussion

Jaromir's avatar
Jaromir
Frequent Visitor
9 years ago
Solved

Visualization: stock differences between days

Hi there, I have a database with products (quantity in stock) and their changes in time and I need a graph with differences between days. The table can look like this:   I don't know how to...
  • tringuyenminh92's avatar
    tringuyenminh92
    9 years ago

    Hi Jaromir,

     

    You could create calculated measure for "Total sales to previous date":

     

    Prev Sales = CALCULATE(SUM(Sales[Sales]),PREVIOUSDAY(Sales[Date]))

    Create calculated measure for stock differences between days:

     

    stock differences between days = sum(Sales[Sales])- [Prev Sales]

     

     

     

    If this works for you please accept it as solution and also like to give KUDOS.

    Best regards
    Tri Nguyen