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
Anonymous
Not applicable

Using AND expression in DISTINCT COUNT

Hello, 
 
I'm trying to get a new measure to work, basically I want it to find the percentage of rows that meet two conditions. It says it can't have data from 2 columns. Is there something similar to the measure below that will give me what I need?
 
% C6 NEEDS Deal = CALCULATE(DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]), 'C6 needs TUNED IN'[C6 NEEDS Tuned in]= "Deal" && 'C6 needs TUNED IN'[C6 Needs tuned in response] = "Selected") / DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier])
 
Thanks in advance!
1 ACCEPTED SOLUTION

Hi @Anonymous 

 

try change && by comma... e use DIVIDE... show blank(), when DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]) is zero.

 

% C6 NEEDS Deal = divide(CALCULATE(DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]), 'C6 needs TUNED IN'[C6 NEEDS Tuned in]= "Deal" , 'C6 needs TUNED IN'[C6 Needs tuned in response] = "Selected") , DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]))

 

Regards.

View solution in original post

4 REPLIES 4
Thejeswar
Super User
Super User

Hi @Anonymous ,

Can you share some sample data ?

 

That would make it easier for us to help..

Anonymous
Not applicable

Hi @Thejeswar , 

 

Unfortunately its client data so im unable to share it. Basically the measure should count the number of rows which meet the conditions in each of those columns (e.g. say 'Deal' and 'Selected'), then divide by the unique number of IDs in the table to get the percentage.

 

Thanks for your help!

Hi @Anonymous 

 

try change && by comma... e use DIVIDE... show blank(), when DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]) is zero.

 

% C6 NEEDS Deal = divide(CALCULATE(DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]), 'C6 needs TUNED IN'[C6 NEEDS Tuned in]= "Deal" , 'C6 needs TUNED IN'[C6 Needs tuned in response] = "Selected") , DISTINCTCOUNT('C6 needs TUNED IN'[uuid: Respondent identifier]))

 

Regards.

Anonymous
Not applicable

Hi @evandrocunico ,

 

I think that works, thanks for the suggestion!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors