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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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