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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
king5six1
Regular Visitor

Help with COUNTIFS Formula in DAX

Hello. Newbie here. I have a problem I have been trying to solve to no avail. I have a COUNTIF formual in excel that is returning a percentage based on several columns. I cannot get this working in DAX. I tried several different ways based on search results. Hoping someone can help me out. 

 

The formula I have currently is

 

=IFERROR(COUNTIFS('CSAT Data'!$N:$N,1,'CSAT Data'!$K:$K,$U9&"*",'CSAT Data'!$R:$R,$A9)/COUNTIFS('CSAT Data'!$Q:$Q,1,'RPI CSAT Data'!$K:$K,$U9&"*",'CSAT Data'!$R:$R,$A9),"-")

 

I have a column "N" Labeled Negative Count where 1=yes and 0=No

Column K is Team Names

Column R is week ending date

Column Q is count where everything = 1

 

The formula is taking a Count of Negative Items that equal 1 by support tier and dividing it by the total number of Count.

 

EX: Team = 'Platinum' has a count of 25 and 2 of those are Negatives. So 2/25 = 8%

 

Any help is greatly appreciated.

 

 

1 ACCEPTED SOLUTION

Hi @king5six1,

Based on my test, you could use the Count function to calculate the percentage:

Sample data:

1.PNG

Create a measure:

Measure = CALCULATE(COUNT(Table1[N]),FILTER('Table1','Table1'[N]=1))/CALCULATE(COUNT(Table1[Q]),FILTER('Table1','Table1'[Q]=1))

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @king5six1,

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BobBI
Resolver III
Resolver III

 

Hi ,

 

Can you post your power bi table with value so i could write the DAX with reference to those cols.

Just to give you a quick headaround

 

Thanks,

Bob

Im not sure I can post the whole thing. There is some confidential info in there. If this helps, the specific column names are. I am trying to rebuild an excel report from scratch using the source salesforce reports in Power BI.

 

Negative Score

Count

Representative: Role: Name (groups) - This is the teams. I had to create a group for them as several roles make up a Team.

Hi @king5six1,

Based on my test, you could use the Count function to calculate the percentage:

Sample data:

1.PNG

Create a measure:

Measure = CALCULATE(COUNT(Table1[N]),FILTER('Table1','Table1'[N]=1))/CALCULATE(COUNT(Table1[Q]),FILTER('Table1','Table1'[Q]=1))

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

Top Solution Authors
Top Kudoed Authors