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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Chandrashekar
Resolver III
Resolver III

Unique Count : Based on multi condition

Hello,

 

How to get unique count based on multi condition.

 

Sample Data: Sample Data  1. Excel file(Having formulas), 2. PBIX file(Help me to get DAX formula).

 

Regards,

Chandrashekar B

1 ACCEPTED SOLUTION

Hello James,

 

I am looking for unqiue count based on multi condition. For Ex:

Filter Below:

Column1=Exclude :"HD"

Column3=Incude 1

Column4=Include "First" & "Second"

Column5=Include CH.

 

Below Table after filtering. I need to take unique count from Column2 that will be 10.

Column1Column2Column3Column4Column5Hours
IECT11SecondCH10
KESSCT31SecondCH10
KESSCT41SecondCH10
MylifeCT51FirstCH10
MylifeCT71FirstCH10
MylifeCH11FirstCH10
KESSCT81SecondCH10
MylifeCH21FirstCH11
MylifeCH21FirstCH12
MylifeCH21FirstCH12
MylifeCH31FirstCH12
MylifeCH31FirstCH12
MylifeCH31FirstCH12
MylifeCH41FirstCH12
MylifeCH41FirstCH12

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Chandrashekar 

 

I cannot reach your expected results. Not sure what you are looking for !

here 2 measures :

Unique Count =

calculate(DISTINCTCOUNT(Sheet1[Column1]),filter(Sheet1,not Sheet1[Column2]IN {"HD"}&&Sheet1[Column3]=1&&Sheet1[Column5]="CH"&&Sheet1[Column4] IN {"First","Second"}))
 
count = calculate(COUNTROWS(Sheet1),filter(Sheet1,not Sheet1[Column2]IN {"HD"}&&Sheet1[Column3]=1&&Sheet1[Column5]="CH"&&Sheet1[Column4] IN {"First","Second"}))

Hello James,

 

It is working fine and thanks for the solution.

 

Regards,

Chandrashekar B

Hello James,

 

I am looking for unqiue count based on multi condition. For Ex:

Filter Below:

Column1=Exclude :"HD"

Column3=Incude 1

Column4=Include "First" & "Second"

Column5=Include CH.

 

Below Table after filtering. I need to take unique count from Column2 that will be 10.

Column1Column2Column3Column4Column5Hours
IECT11SecondCH10
KESSCT31SecondCH10
KESSCT41SecondCH10
MylifeCT51FirstCH10
MylifeCT71FirstCH10
MylifeCH11FirstCH10
KESSCT81SecondCH10
MylifeCH21FirstCH11
MylifeCH21FirstCH12
MylifeCH21FirstCH12
MylifeCH31FirstCH12
MylifeCH31FirstCH12
MylifeCH31FirstCH12
MylifeCH41FirstCH12
MylifeCH41FirstCH12

Hello,

 

I will come back to you.

 

Regards,

Chandrashekar B

tamerj1
Super User
Super User

Hi @Chandrashekar 
Not sure if this is what you're looking for?

1.png

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.