Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello. I need help!!!
I'm having trouble creating a dax measure. I have a table with person ID / appliance status ID / appliance status ID.
I want to build a measure that tells me how many people have appliance 1 and in state 2, and at the same time have appliance 15 in state 3.
The person may have repeated appliances and in different states. I need to count the people who meet that condition
The table has such a shape
| Id persona | Id appliance | Id state |
| 1 | 1 | 1 |
| 1 | 1 | 2 |
| 1 | 15 | 3 |
| 2 | 15 | 1 |
| 2 | 1 | 1 |
| 3 | 1 | 2 |
| 3 | 1 | 2 |
| 3 | 15 | 2 |
3 | 15 | 1 |
| 4 | 1 | 1 |
| 4 | 1 | 2 |
| 4 | 15 | 1 |
| 4 | 15 | 3 |
Solved! Go to Solution.
@Syndicate_Admin , Try a measure like
countx(filter(summarize(TABLE, Table[Id persona], "_1", calculate(count(Table[Id persona]), filter(Table, table[Id appliance]-1 && table[Id state] ?2))
, "_2", calculate(count(Table[Id persona]), filter(Table, table[Id appliance]-15 && table[Id state] ?3))) , [_1] >0 && [_2] >0 ), [Id persona])
@Syndicate_Admin , Try a measure like
countx(filter(summarize(TABLE, Table[Id persona], "_1", calculate(count(Table[Id persona]), filter(Table, table[Id appliance]-1 && table[Id state] ?2))
, "_2", calculate(count(Table[Id persona]), filter(Table, table[Id appliance]-15 && table[Id state] ?3))) , [_1] >0 && [_2] >0 ), [Id persona])
Thanks a lot!!! It was just what I needed!!!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |