Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Raul
Post Patron
Post Patron

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
Post Patron
Post Patron

I found the solution!

The measure is:

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

🙂

View solution in original post

1 REPLY 1
Raul
Post Patron
Post Patron

I found the solution!

The measure is:

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

🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.