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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
PBI_newuser
Post Prodigy
Post Prodigy

How to flag the "Zero" rows but ignore the Blank rows

Hi, I have the below sample dataset and i wish to flag those NPS between 0 to 6 as 1, but the below column doesn't work.

It considered 0 and BLANK as the same value. 

 

Detractor Flag = 
IF('Table'[NPS]=BLANK(),BLANK(),
IF('Table'[NPS]>=0 && 'Table'[NPS]<=6,1
,0))

 

Serial NumberNPSDetractor FlagExpected Output for Detractor Flag
SN-111   
SN-2220 1
SN-333411
SN-4440 1
SN-555511
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @PBI_newuser 

Please try the below.

instead of =blank() , try ==blank()

 

Detractor Flag CC =
IF('Table'[NPS]==BLANK(),BLANK(),
IF('Table'[NPS]>=0 && 'Table'[NPS]<=6,1
,0))
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Flag = 
IF(
    NOT ISBLANK( 'Table'[NPS] ),
    IF( 'Table'[NPS] * ( 'Table'[NPS] - 6 ) <= 0, 1, 0 )
)

Screenshot 2021-06-16 112246.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Jihwan_Kim
Super User
Super User

Hi, @PBI_newuser 

Please try the below.

instead of =blank() , try ==blank()

 

Detractor Flag CC =
IF('Table'[NPS]==BLANK(),BLANK(),
IF('Table'[NPS]>=0 && 'Table'[NPS]<=6,1
,0))
 

Hi, My name is Jihwan Kim.


If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.


Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.