Forum Discussion

FrankWeng's avatar
FrankWeng
Frequent Visitor
6 years ago
Solved

How to count daily usage

Hi:

Please if someone can help, as below table I have to count materials daily stock Qty.

How to write a formula in BI to get each material daily usage?

Ex, Item A usage on 3/18 = 3000-2500=500

6 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Hi FrankWeng 

    try a measure

    Measure = 
    calculate(MAX('Table'[daily stock Qty]),ALLEXCEPT('Table','Table'[Item],'Table'[Date])) 
    - 
    calculate(MIN('Table'[daily stock Qty]),ALLEXCEPT('Table','Table'[Item],'Table'[Date]))
    • FrankWeng's avatar
      FrankWeng
      Frequent Visitor

      az38 

      Thanks for help, but it's still not working.

      Do you find any mistake from me?

      • az38's avatar
        az38
        Icon for Community Champion rankCommunity Champion

        FrankWeng 

        in your screnshots I see the only row per day for each Item

        Date field is the Date or Datetime?