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.
Hi everybody!
I need your help for this situation. I hava a table (TABLE1) like this:
ID | VALUE |
A1 | 200 |
A4 | 300 |
A5 | 50 |
A10 | 100 |
This table is related 1->* to another table (TABLE2), this one:
ID | NAME | SURV |
A1 | AAAA | 1111 |
A1 | AAAA | 1111 |
A1 | AAAA | 1111 |
A1 | AAAA | 2222 |
A1 | AAAA | 2222 |
A1 | AAAA | 3333 |
A1 | AAAA | 4444 |
A2 | BBBBB | 5555 |
A2 | BBBBB | 5555 |
A2 | BBBBB | 6666 |
A3 | CCCCC | 7777 |
A3 | CCCCC | 8888 |
A3 | CCCCC | 8888 |
A4 | DDDDD | 9999 |
A4 | DDDDD | 9999 |
A4 | DDDDD | 9999 |
A4 | DDDDD | 9999 |
A4 | DDDDD | 10000 |
A4 | DDDDD | 10000 |
- | - | - |
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:
Id | Name | NumSurv |
A1 | AAAA | 3 |
A4 | DDDD | 2 |
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:
Id | Name | NumSurv | TotalSurv |
A1 | AAAA | 3 | 3 |
A4 | DDDD | 2 | 2 |
Total | 5 | 5 |
And this I want it show:
Id | Name | NumSurv | TotalSurv |
A1 | AAAA | 3 | 5 |
A4 | DDDD | 2 | 5 |
Total | 5 | 5 |
What is the formula for the measure TotalSurv?
Thnaks!!.
Solved! Go to Solution.
I found the solution!
The measure is:
TotalSurv = CALCULATE([NumSurv],ALLSELECTED(Table2))
🙂
I found the solution!
The measure is:
TotalSurv = CALCULATE([NumSurv],ALLSELECTED(Table2))
🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |