cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Raul
Helper V
Helper V

Total for a column

Hi everybody!

I need your help for this situation. I hava a table (TABLE1) like this:

 

IDVALUE
A1200
A4300
A550
A10100

 

This table is related 1->* to another table (TABLE2), this one:

 

IDNAMESURV
A1AAAA1111
A1AAAA1111
A1AAAA1111
A1AAAA2222
A1AAAA2222
A1AAAA3333
A1AAAA4444
A2BBBBB5555
A2BBBBB5555
A2BBBBB6666
A3CCCCC7777
A3CCCCC8888
A3CCCCC8888
A4DDDDD9999
A4DDDDD9999
A4DDDDD9999
A4DDDDD9999
A4DDDDD10000
A4DDDDD10000
---

 

In this table, I have a measure called NumSurv = DISTINCTCOUNT(Table2[SURV]) that returns the number of answers to a questions. I show this model into a table visualization like this:

 

IdNameNumSurv
A1AAAA3
A4DDDD2
Total 5

 

This visualization have a filter for the Id (only shows A1 and A4, the Id that exists in the Table1)

I want a measure that returns the total of the NumSurv, in this case, 5. I created a new measure called TotalSurv but the result is not correct when I put it in the table visualization:

 

TotalSurv = CALCULATE([NumSurv],ALLSELECTED(Table2[Name]))

 

This is how it's show:

 

IdNameNumSurvTotalSurv
A1AAAA33
A4DDDD22
Total 55

 

And this I want it show:

 

IdNameNumSurvTotalSurv
A1AAAA35
A4DDDD25
Total 55

 

What is the formula for the measure TotalSurv?

Thnaks!!.

1 ACCEPTED SOLUTION
Raul
Helper V
Helper V

I found the solution!

The measure is:

TotalSurv = CALCULATE([NumSurv],ALLSELECTED(Table2))

🙂

View solution in original post

1 REPLY 1
Raul
Helper V
Helper V

I found the solution!

The measure is:

TotalSurv = CALCULATE([NumSurv],ALLSELECTED(Table2))

🙂

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!