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 August 31st. Request your voucher.

Reply
DemoFour
Responsive Resident
Responsive Resident

Count ID once when it has many values in the table

I have a series of questions (34) that link to a set of 4 KPI's categories KPI 1, KPI 2, KPI 3 & KPI4.

Each KPI has more than 1 question related to it, which a client can answer yes to.

Each client can answer yes to multiple questions that link to the same KPI from the 34 questions asked.

I would like to count the number of clients that meet the KPI only once

 

What is the best way to set this out?

 

I have a table of all the questions with a yes by the questions they answered yes to. Ech client can anwer multpul questions but only the yes is brought into the table. 

I have a static table that references which question relates to the KPI indicated by a 1 in the table for each question relating to the KPI.

 

In the visual you can see the KPI 1 and the number of questions related to this.

 PBI3.PNG

The visual is just a table. Count of question ID is made by dropping in question ID twice and then changing one to count. KPI is from a static table and filtered to show the 1 next to the question ID

 

The help I need is, I have 8 clients who have answered one or more questions and I want to show a visual of KPI 1 and a count of 8 next to it

 

So the return that I want from my measure is 8 individual clients answered yes to a question that relates to the KPI 1

 

Any help would be greatly received, as I am new to DAX and still learning as I go along and this is a bit more complex to calculate

1 ACCEPTED SOLUTION

Hi @Greg_Deckler 

 

Thanks for the tip!

 

In the end I went with 

 

KPI 1 Count = 
 CALCULATE(
     DISTINCTCOUNTNOBLANK( 'Support Needs'[Client Application ID] ),
     'Support Needs'[KPI 1] = 1
 )

 

This worked for me and gave the desired result.

 

 

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

So in general you would use SUMMARIZE or you could use DISTINCT along with COUNTROWS or even DISTINCTCOUNT.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

Thanks for the tip!

 

In the end I went with 

 

KPI 1 Count = 
 CALCULATE(
     DISTINCTCOUNTNOBLANK( 'Support Needs'[Client Application ID] ),
     'Support Needs'[KPI 1] = 1
 )

 

This worked for me and gave the desired result.

 

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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