cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Sum of values from same column

Hi Team,

 

Can someone help me acheive the below outcome in Table Matrix Visual. If i enable the column sub total it is counting the unique values which is not  expected and the expectation is if i click on any value in the table matrix including the total , the other charts  should change accordingly and this is not happening with measures. Note: I have A and B from the same column called "Services" and the values in the matrix are the unique count of computer names.

 

Region AA+B 
Andean 101121
US 257
Brazil279

 

Also is there any way where i can have calendar instead of the drop down list that changes these values based on the date selection.

Date.PNG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Sum of values from same column

@Dsingh why you are using distinct?






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

7 REPLIES 7
Highlighted
Super User IV
Super User IV

Re: Sum of values from same column

This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Super User IV
Super User IV

Re: Sum of values from same column

@Dsingh can you share sample data and expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper I
Helper I

Re: Sum of values from same column

Hi,

 

Thanks for your reply.

 

Please see the sample data

 

Computer nameServicesRegion 
xAUS
yBBrazil
zBAndean
xABrazil
yABrazil

 

Expected Outcome

Region AA+B 
Andean 011
US 101
Brazil213

 

Highlighted
Super User IV
Super User IV

Re: Sum of values from same column

@Dsingh try this in matrix visual

 

image.png

 

and measure would be simple dax expression 

Measure = COUNTROWS( Table )

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Helper I
Helper I

Re: Sum of values from same column

Hi,

 

This is what i got. Total is still not the sum of Software Not Installed(a) and Service Not Running(b) columns. If i donot use distinct in the measure then the values in the 2 columns a and b are not accurate.

 

result.PNG

 

 

 

 
Highlighted
Super User IV
Super User IV

Re: Sum of values from same column

@Dsingh why you are using distinct?






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Highlighted
Helper I
Helper I

Re: Sum of values from same column

Hi,

Thank you for the help! Finally it worked . 

Total = COUNTROWS(DISTINCT(table)) - Distinct is used there were duplicate computer names.
 
result.PNG
 
One last thing: How do i fill in the blanks with 0 in the table matrix. Adding +0 to the Total measure is not working.
 
Thanks!

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors