Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
FrankWeng
Frequent Visitor

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

Capture.JPG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Find the solution here:

https://1drv.ms/u/s!ApyQEauTSLtOgYM7dKfyqO1PXHHdew?e=aVPNdv

Inspect the data and the model thoroughly.

Best
D

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Find the solution here:

https://1drv.ms/u/s!ApyQEauTSLtOgYM7dKfyqO1PXHHdew?e=aVPNdv

Inspect the data and the model thoroughly.

Best
D
az38
Community Champion
Community 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]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 

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

Do you find any mistake from me?

Capture.JPG

az38
Community Champion
Community Champion

@FrankWeng 

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

Date field is the Date or Datetime?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

@az38 

Hi, the date field is pure Date type. Would be possible I send you the .pbix file?

Capture.JPG

az38
Community Champion
Community Champion

@FrankWeng 

share pbix-file to cloud is always the best idea


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors