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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Flawn
Helper III
Helper III

Count # of times, for a distint value of one column, that 2+ seperate values appear in another

Hello All!

I think this question is *relatively* easy but none the less I have been unable to figure out the answer!

I have an unpivoted table that looks like a much larger version of the following screenshot:

Capture.PNG

I am looking to create two measures from this table:

The first measure is a count of the number of mcs_client Ids for which two or more *distinct* Score values occur. (This count would include mcs_client ids liek the one circled in blue).

The second measure is a count of the number of mcs_client ids for which only one *distinct* Score value occurs. (This count would include mcs_client ids like the one circled in red).

I've fidged with a few different measurement designs and none seem to have produced the right count. Any insight would be greatly appreciated - and I'm happy to provide more information if needed.

Thanks Again
-Flawn

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Flawn 

 

use these measures:

 

Measure_1 Score = 
COUNTROWS(FILTER(
		SUMMARIZE(
			'Table',
			'Table'[msc_client],
			"C", DISTINCTCOUNT('Table'[Score])
		),
		[C] = 1
	))

 

 

and for more than 1 score:

 

Measure>1 Score = 
COUNTROWS(FILTER(
		SUMMARIZE(
			'Table',
			'Table'[msc_client],
			"C", DISTINCTCOUNT('Table'[Score])
		),
		[C] > 1
	))

 

 

result:

VahidDM_0-1718076553950.png

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn|Twitter|Blog |YouTube 

View solution in original post

3 REPLIES 3
Flawn
Helper III
Helper III

Hah well that seems to have done it - turns out I was close but not quite there.

Thanks Vahid

You are welcome 🙂

VahidDM
Super User
Super User

Hi @Flawn 

 

use these measures:

 

Measure_1 Score = 
COUNTROWS(FILTER(
		SUMMARIZE(
			'Table',
			'Table'[msc_client],
			"C", DISTINCTCOUNT('Table'[Score])
		),
		[C] = 1
	))

 

 

and for more than 1 score:

 

Measure>1 Score = 
COUNTROWS(FILTER(
		SUMMARIZE(
			'Table',
			'Table'[msc_client],
			"C", DISTINCTCOUNT('Table'[Score])
		),
		[C] > 1
	))

 

 

result:

VahidDM_0-1718076553950.png

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

LinkedIn|Twitter|Blog |YouTube 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.