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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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