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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi all,
Im have one table with two columns, one with the ID and one with text. I want to distincount the ID table but only based if the two filtering critiera is met. For example in the table below, I want to count numbers of ID that contains both "FAST" and "MID" in the Type column (ID nr 1 and 3).
My starting code was:
ID | Type |
1 | FAST |
1 | MID |
1 | SLOW |
2 | SLOW |
3 | MID |
3 | FAST |
4 | FAST |
Solved! Go to Solution.
Hi @Anonymous ,
You can create a measure with below code:-
Measure =
CALCULATE (
DISTINCTCOUNT ('Export Data SE'[ID]),
CALCULATETABLE (
VALUES ( 'Export Data SE'[ID] ),
'Export Data SE'[Type] = "FAST"
),
CALCULATETABLE (
VALUES ( 'Export Data SE'[ID] ),
'Export Data SE'[Type] = "MID"
)
)
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @Anonymous ,
You can create a measure with below code:-
Measure =
CALCULATE (
DISTINCTCOUNT ('Export Data SE'[ID]),
CALCULATETABLE (
VALUES ( 'Export Data SE'[ID] ),
'Export Data SE'[Type] = "FAST"
),
CALCULATETABLE (
VALUES ( 'Export Data SE'[ID] ),
'Export Data SE'[Type] = "MID"
)
)
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin