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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mstone3
Helper II
Helper II

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 @mstone3 ,

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 @mstone3 ,

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 @mstone3 ,

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 @mstone3 ,

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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