Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How to Fix Subtotal

Hello - Looking for some, please. I tried to solve it through various solutions on the PowerBI community/Youtube as most of the time is HASONEVALUE function but I am not able to solve so sharing my problem here. Please help if possible.


I am trying to calculate a weighted average of working days. The weighted average is getting calculated correctly, but the subtotals are wrong. Example: For UK & Ireland I am expecting a value of 5 which is 0.18+4.82 but I get 10 which is the sum of the absolute working days. Please suggest the right method if possible.





Super User
Super User


Does this measure work?

Measure = SUMX(VALUES(Data[Display Country name]),[Current Weighted avg])

Ashish Mathur

Hi Ashish, Thank you for the comment. I solved it with some of the research on the web. I used the ISINCOPE function and added the syntax similar to what you suggested.

IF(ISINSCOPE(Region[Display Country Name]),SUMX(vTable,[Weighted WD]) ,SUMX(vTable,Divide([Country Sales], [Total Sales])* [Working days]))


Thank you for your time.

Best regards

Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Please show the expected outcome based on the sample data you provided.

Helpful resources

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