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
Hi I need to create a measure that will look up customers where they have only one order open for a specific service type. ie. Where this service type is the ONLY order they have.
Using my table below, I'd like to have a measure that returns only Michael's record when looking for customers that ONLY have Boogie 🙂
| Customer | Service type | Order Number |
| Tito | Sunshine | 123 |
| Jermaine | Moonlight | 456 |
| Jermaine | Good Times | 789 |
| Jermaine | Boogie | 111 |
| Michael | Boogie | 222 |
Probaly dead simple but I'm having a block...
Appreciate the help.
Solved! Go to Solution.
Hi @Darren204
Please check below measure.You may use it in visual level filter to filter the table.
filter =
VAR count1 =
CALCULATE ( COUNT ( Table2[Customer] ), ALLEXCEPT ( Table2, Table2[Customer] ) )
VAR count2 =
CALCULATE (
COUNT ( Table2[Customer] ),
ALLEXCEPT ( Table2, Table2[Service type] )
)
RETURN
IF ( count1 = 1 && count2 > 1, 1 )
Regards,
Hi @Darren204
Please check below measure.You may use it in visual level filter to filter the table.
filter =
VAR count1 =
CALCULATE ( COUNT ( Table2[Customer] ), ALLEXCEPT ( Table2, Table2[Customer] ) )
VAR count2 =
CALCULATE (
COUNT ( Table2[Customer] ),
ALLEXCEPT ( Table2, Table2[Service type] )
)
RETURN
IF ( count1 = 1 && count2 > 1, 1 )
Regards,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |