cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors