March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!!!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
127 | |
82 | |
69 | |
53 | |
44 |
User | Count |
---|---|
202 | |
106 | |
100 | |
64 | |
56 |