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
Chandrash12
Frequent Visitor

Custom Total

Hello All,

 

I have table where each month have a measure with distinct count but row total is also in distinct count. However the Row total should be summation of distinct count accros 4 months. How do i change rwo totals only

 

Chandrash12_0-1667786779964.png

 

1 ACCEPTED SOLUTION
v-xiaosun-msft
Community Support
Community Support

Hi @Chandrash12 ,

 

It is because that when a Measure is used on rows in a table, the column total for those rows is not calculated based on a sum of the results in the rows, but instead it calculates using the same Measure formula and applies it to the total of the data selected.

You can try to create measures like below to get the correct totals.

 

IF(COUNTROWS(VALUES([Option 1]))=1,[MEDIUM],SUMX(VALUES([Option 1]),[MEDIUM]) 

 

Or

 

IF(HASONEFILTER([Option 1]),[MEDIUM],SUMX(VALUES([Option 1]),[MEDIUM]))

 

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

Hi @Chandrash12 ,

 

It is because that when a Measure is used on rows in a table, the column total for those rows is not calculated based on a sum of the results in the rows, but instead it calculates using the same Measure formula and applies it to the total of the data selected.

You can try to create measures like below to get the correct totals.

 

IF(COUNTROWS(VALUES([Option 1]))=1,[MEDIUM],SUMX(VALUES([Option 1]),[MEDIUM]) 

 

Or

 

IF(HASONEFILTER([Option 1]),[MEDIUM],SUMX(VALUES([Option 1]),[MEDIUM]))

 

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

VahidDM
Super User
Super User

Hi @Chandrash12 

 

It's a common and happened a lot.
Please check this link and you will find the solution:
https://www.vahiddm.com/post/why-my-measure-returns-the-wrong-total

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

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.