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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Showing Blank Values as Zero - Problem with Slicer Interaction

Hello - I have a basic matrix visual that looks like this:

 

Matrix 1Matrix 1

The measure I placed in the values well to produce this matrix is: 

Count of Year = COUNTA('Snapshots'[Year])
 
This matrix is also filtered by a slicer from a different column called [Year Type] that has two options: Fiscal Year and Calendar Year.  The slicer is set to 'Fiscal Year' and all is well - I can toggle between fiscal year and calendar year values using the slicer.  However,  I want to show blank values as zero.  So I modified the measure to:
 
Count of Year = COUNTA('Snapshots'[Year])+0
 
The resulting matrix is:
Chart2.PNG
 
So, the new measure worked, but now the problem is that the matrix displays all of the calendar year values in addition to the fiscal year values, even though the slicer is set to fiscal year only.   It is still filtered because all of the calendar year values are zero, but I don't want all of the zero calendar year values to show if the filter is set to fiscal year - I only want to see fiscal year values.
 
Thanks so much for your help!

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

What about the measure below?

Count of Year =
IF ( COUNTA ( 'Snapshots'[Year] ) = 0, 0, COUNTA ( 'Snapshots'[Year] ) )

If you still need help, please share the dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
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

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please feel free to ask.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

What about the measure below?

Count of Year =
IF ( COUNTA ( 'Snapshots'[Year] ) = 0, 0, COUNTA ( 'Snapshots'[Year] ) )

If you still need help, please share the dummy pbix file which can reproduce the scenario, so that we can help further investigate on it? You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @Anonymous ,

 

May be solution in this post helps you.

 

https://community.powerbi.com/t5/Desktop/Display-zero-instead-of-blank-in-matrix/td-p/193745

 

you can create another table refrencing to your pay plan 

 

Thanks,

Tejaswi

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.