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 September 15. Request your voucher.

Reply
nonprofitnovice
New Member

Distinct Count Challenge

Hello all! I am having an issue and can't wrap my head around the solution or problem after hours of googling. I would really appreciate any help or ideas.

 

The problem: I am working on analyzing a survey from 5 organizations that each coded responses differently. I appended them in PowerQuery and then cleaned them in PQ and Dax. There are 703 unique respondents to the survey who were asked about using different water sources. However, when I create a bar chart, it shows more than 703 yes/no responses.

nonprofitnovice_0-1674242486595.png

 

The visual is based off this, with count distinct for the Index:

nonprofitnovice_4-1674243155221.png

 

 

The data in the table is based off a calculated column in Dax:

 

nonprofitnovice_2-1674242743744.png

 

The columns "uses for Cooking" and "Uses for Drinking" I made using Switch as per below (example from "Uses for Drinking")

 

nonprofitnovice_1-1674242638146.png

 

nonprofitnovice_3-1674242967020.png

 

I think the problem with the table might be because it is showing a distinct count of indexes for both the "yes" and "no" responses per water source per type of use ( I want the distinct count of indexes for "yes" OR "no", so that it will show something like "Count distinct Index if "yes" or "no" for any type of use of the water source"

 

Is there a problem with my calculated columns?

 

Is there a way I can create a measure to get this distinct count? 

 

Or any other ideas about what the problem could be and how to solve it?

 

Thanks so much in advance to all.

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.