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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.