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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ledoyle1121
Frequent Visitor

DAX formulas for Where statements

Hi,

 

I have a column in my data which is called "NPS Category", which classifies each Case Number listed. Each row in the data either have the values of "Promoter", "Detractor", or "Neutral" within this NPS Category column. 

 

I'm trying to create a measure similar to the below for each of the possible Category values (Promoter, Detractor, or Neutral): 

 

NPS Neutral Count =(Count([Case Number]Where([NPS Categories]="Neutral")))

 

This would give me a final count of the number of rows that have the value of "Neutral". The "Case Number" would be a unique value for each row. 

 

I'm having trouble figuring how to do this with DAX, and was hoping someone could help?

 

Thanks!

 

1 ACCEPTED SOLUTION
mattbrice
Solution Sage
Solution Sage

Measure =
CALCULATE (
    DISTINCTCOUNT ( Table[CaseNumber] ),
    Table[NPS Category] = "Neutral"
)

View solution in original post

2 REPLIES 2
mattbrice
Solution Sage
Solution Sage

Measure =
CALCULATE (
    DISTINCTCOUNT ( Table[CaseNumber] ),
    Table[NPS Category] = "Neutral"
)

Not sure what I was doing wrong before - but that worked perfect, thanks!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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