Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi all,
I have the following code (and several simialr) plugged into a matrix table:
NTF data total count (planned) =
COUNTA(‘data set 1’[1: Booking Solutions - 1: Planned])+
COUNTA(‘data set 1’[5: Document Management / File Sharing - 5: Planned])+
COUNTA(‘data set 1’[6: Electronic / Card Payment - 6: Planned])+
COUNTA(‘data set 1’[10: Human Resource Management HRM - 10: Planned])+
COUNTA(‘data set 1’[14: Server / Infrastructure - 14: Planned])+
COUNTA(‘data set 1’[16: Software Hardware Upgrades - 16: Planned])+
COUNTA(‘data set 1’[22: Voice Over IP VoIP - 22: Planned])+
COUNTA(‘data set 1’[25: Website e-Commerce - 25: Planned])
My question is, how would I get it to return blank measures as a "0" or "-".
Many thanks in advance.
Solved! Go to Solution.
Hi @Anonymous
To return 0, you can simply add '+0' to the end of your DAX expression.
To return '-', you can use the following:
NTF data total count (planned) =
VAR DataCount =
COUNTA ( 'data set 1'[1: Booking Solutions - 1: Planned] )
+ COUNTA ( 'data set 1'[5: Document Management / File Sharing - 5: Planned] )
+ COUNTA ( 'data set 1'[6: Electronic / Card Payment - 6: Planned] )
+ COUNTA ( 'data set 1'[10: Human Resource Management HRM - 10: Planned] )
+ COUNTA ( 'data set 1'[14: Server / Infrastructure - 14: Planned] )
+ COUNTA ( 'data set 1'[16: Software Hardware Upgrades - 16: Planned] )
+ COUNTA ( 'data set 1'[22: Voice Over IP VoIP - 22: Planned] )
+ COUNTA ( 'data set 1'[25: Website e-Commerce - 25: Planned] )
VAR Result =
IF ( ISBLANK ( DataCount ), "-", DataCount )
RETURN
Result
Best regards,
Martyn
Hi @Anonymous
To return 0, you can simply add '+0' to the end of your DAX expression.
To return '-', you can use the following:
NTF data total count (planned) =
VAR DataCount =
COUNTA ( 'data set 1'[1: Booking Solutions - 1: Planned] )
+ COUNTA ( 'data set 1'[5: Document Management / File Sharing - 5: Planned] )
+ COUNTA ( 'data set 1'[6: Electronic / Card Payment - 6: Planned] )
+ COUNTA ( 'data set 1'[10: Human Resource Management HRM - 10: Planned] )
+ COUNTA ( 'data set 1'[14: Server / Infrastructure - 14: Planned] )
+ COUNTA ( 'data set 1'[16: Software Hardware Upgrades - 16: Planned] )
+ COUNTA ( 'data set 1'[22: Voice Over IP VoIP - 22: Planned] )
+ COUNTA ( 'data set 1'[25: Website e-Commerce - 25: Planned] )
VAR Result =
IF ( ISBLANK ( DataCount ), "-", DataCount )
RETURN
Result
Best regards,
Martyn
Many thanks, that worked perfectly
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |