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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
SG-01
Helper I
Helper I

Count unique distinct values of two columns

Hi,

 

I have the following data:

SeasonRound
20211
20221
20212
20222
20213

 

The combination of Season and Round is in my case unique. I want to count the unique values of those two columns. The total here should be 5.

1 ACCEPTED SOLUTION
RaulB
Frequent Visitor

Try 

Measure = COUNTROWS(DISTINCT('Table'[Round]))+COUNTROWS(DISTINCT('Table'[Season]))

View solution in original post

5 REPLIES 5
RaulB
Frequent Visitor

Try 

Measure = COUNTROWS(DISTINCT('Table'[Round]))+COUNTROWS(DISTINCT('Table'[Season]))
Ahmedx
Super User
Super User

pls try this

 

m1 = COUNTROWS(DISTINCT(UNION (VALUES('table'[Product],VALUES('table'[Category])))

 

That does not work unfortunately, for every value it returns 2 instead of 1...

Share sample pbix file to help you.

 

I can't... but I changed my post. If I use your measure I get not enough value back.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.