Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to calculate my NPS scores but it is counting blanks in the distractors and total rows.
Solved! Go to Solution.
Hi @Anonymous ,
If you want to use <> blank in your formula, the measure should be like this:
Calculated NPS =
VAR _participantAdvocates =
CALCULATE (
COUNTROWS ( 'Primary' ),
FILTER (
ALL ( 'Primary' ),
'Primary'[NPS Score] >= 9
&& 'Primary'[NPS Score] <> BLANK ()
)
)
VAR _participantDetractors =
CALCULATE (
COUNTROWS ( 'Primary' ),
FILTER (
ALL ( 'Primary' ),
'Primary'[NPS Score] <= 6
&& 'Primary'[NPS Score] <> BLANK ()
)
)
VAR _totalParticipantResponses =
CALCULATE ( COUNTROWS ( 'Primary' ), 'Primary'[NPS Score] <> BLANK () )
RETURN
DIVIDE (
_participantAdvocates - _participantDetractors,
_totalParticipantResponses
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @Anonymous
instead of using COUNTROWS (that counts the rows of table) you can use COUNTA, where you have to reference to a column. This function counts all values that are not empty.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
hey, on the calculate segment filter for this dax add a filter as follow:
calculate(expresion, "filter" nps score column <>BLANK())
that <>blank() filter will make it only calculate for the no blank cells in that column you spacify
if this helped please mark as solution, if you liked it give some kudos. 🙂
Proud to be a Super User!
I tried the following but did not seem to work.
Hi @Anonymous ,
If you want to use <> blank in your formula, the measure should be like this:
Calculated NPS =
VAR _participantAdvocates =
CALCULATE (
COUNTROWS ( 'Primary' ),
FILTER (
ALL ( 'Primary' ),
'Primary'[NPS Score] >= 9
&& 'Primary'[NPS Score] <> BLANK ()
)
)
VAR _participantDetractors =
CALCULATE (
COUNTROWS ( 'Primary' ),
FILTER (
ALL ( 'Primary' ),
'Primary'[NPS Score] <= 6
&& 'Primary'[NPS Score] <> BLANK ()
)
)
VAR _totalParticipantResponses =
CALCULATE ( COUNTROWS ( 'Primary' ), 'Primary'[NPS Score] <> BLANK () )
RETURN
DIVIDE (
_participantAdvocates - _participantDetractors,
_totalParticipantResponses
)
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 10 | |
| 9 | |
| 6 | |
| 5 | |
| 3 |