Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Distincount based on multiple filters in one column

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 = CALCULATE(DISTINCTCOUNT('Export Data SE'[ID]),FILTER('Export Data SE','Export Data SE'[Type] in {"FAST","MID"})
 
I assume this is incorret: in "{"FAST","MID"}" and I have tried several other ways e.g. in "FAST" &&"MID", "FAST" || "MID".
 
Thanks in advance!

 

IDType
1FAST
1MID
1SLOW
2SLOW
3MID
3FAST
4FAST
1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

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:-

image.png

 

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

View solution in original post

1 REPLY 1
Samarth_18
Community Champion
Community Champion

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:-

image.png

 

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.