cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FAA9
Frequent Visitor

Multiplication of two calculated measures & wrong subtotals

hi,

I am struggling to find the right measure for calculating the subtotal at the month level for the Weighted (WTD) stock cover in weeks.
Example of row-wise calculation: (12%+27%)*7.6 = 3.0 of wtd stock cover in wks for Partner A.

In the month total I want to sum up all these results from sub-category and regional level for each Partner to get the sum shown on extreme right. 

Whats the best way to get that? I have tried sumx and summarize etc. Nothing is working 😞
____
Wtd Forecast =
VAR monthly_fc = CALCULATE(Sum[FC Value]), ALLSELECTED(Product[code]), all(Product[Partner]), all(tblDate[Date]) )
VAR weekly_fc = CALCULATE(Sum[FC Value]), ALLSELECTED(Product[code]))

Return
DIVIDE(weekly_fc, monthly_fc)

____
wtd cover= CALCULATE([Days Covers]/7)*(CALCULATE([Wtd Forecast], ALL(Products[Partners]) ) )

FAA9_1-1668184372873.png

 



 

 

1 ACCEPTED SOLUTION
AnkitKukreja
Super User
Super User

Hi! @FAA9 

 

SQL BI covered this topic last month, please have a look at this and see if that helps you.

 

https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/

https://www.youtube.com/watch?v=Rii_6qkLNh8

 

If it doesn't help, Please share the pbix file if possible.

 

 

If my response has addressed your question or concern, kindly mark this post as resolved. If you found my assistance helpful, consider giving it a thumbs.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

View solution in original post

1 REPLY 1
AnkitKukreja
Super User
Super User

Hi! @FAA9 

 

SQL BI covered this topic last month, please have a look at this and see if that helps you.

 

https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/

https://www.youtube.com/watch?v=Rii_6qkLNh8

 

If it doesn't help, Please share the pbix file if possible.

 

 

If my response has addressed your question or concern, kindly mark this post as resolved. If you found my assistance helpful, consider giving it a thumbs.
Thanks,
Ankit Kukreja
www.linkedin.com/in/ankit-kukreja1904

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors