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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Wrong Total

Safety Stock =
VAR MaxWeeklyDemand = [Max]
VAR LeadTimeWeeks = [Max Lead Time in Weeks]
VAR AvgWeeklyDemand = [Avg]
VAR AvgLeadTimeWeeks = [Average Lead Time In Weeks]
VAR DesiredServiceLevel = [Desired service level]

RETURN
((MaxWeeklyDemand * LeadTimeWeeks) - (AvgWeeklyDemand * AvgLeadTimeWeeks)) * DesiredServiceLevel

((16355*17) -(3661*17))*3.09

Given values:
MaxWeeklyDemand = 16355
LeadTimeWeeks = 17
AvgWeeklyDemand = 3661
AvgLeadTimeWeeks = 17
DesiredServiceLevel = 3.09

Getting a total of 666800 which is incorrect. The actual total is 666815.82.
Can anyone help with this?

kulkarnipriya87_0-1689918089162.png

Test 1 = [Max]*[Max Lead Time in Weeks]
              16355*17
             =278035(Expected total)

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

 

Why and how to fix it:

How To Easily Fix Incorrect Measure Totals In Power BI

Why Power BI totals might seem inaccurate

Hope that helps.

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

mlsx4
Memorable Member
Memorable Member

Hi @Anonymous 

Try to do:

Measure= SUMX('Table',[Max]*[Max Lead Time in Weeks])

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.