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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
wilson_smyth
Post Patron
Post Patron

Show categories with zero value, but only for selected parent category (sample Pbix included)

I have data showing employees for each manager, and if the employees have submitted a form.

Im trying to show, on a bar chart, for each manager, the percentage of employees in a category that have submitted.

I need to show 0% also.

 

The challenge i am facing is that when i show categories with 0%, i get all categories back, not just categories for the manager specified in the slicer.

 

e.g. 

 

Manager 100 has employees in category A, B & C, but not  in category D or E.
Category B has 0% submission for manager 100.

chart 1.JPG

 

Ive created a measure to show percentage of employees who have submitted for each manager. Note that Category D & E appear even though manager A is selected in the slicer.

 

%Form Submitted = if( [#FormSubmitted]>0
,[#FormSubmitted]/[TotalEmployees]
,0)


#FormSubmitted = CALCULATE(SUM(EmpFact[EmployeeID]), filter(EmpFact, EmpFact[EmployeeFormSubmitted] = "Y"))


TotalEmployees = sumx(EmpFact, EmpFact[EmployeeID])

chart 2.JPG

How would I just display the categories for the specific manager, in this case A, B & C, but ensuring i can still see Categories with 0%?


The example with the sample data is available here

 

Appreciate any help and expertise.
FYI - Although not necessary here, I need to split the data out into dimension tables for other measures in the real report.

1 ACCEPTED SOLUTION

@wilson_smyth

 

Click on the graph and on Axis section on Visualisations Pane do right click on the down arrow on "Employee Category"and select "Show Items with no data"

 

 

View solution in original post

5 REPLIES 5
themistoklis
Community Champion
Community Champion

@wilson_smyth

 

Change the measure %Form Submitted to this one:

 

%Form Submitted = CALCULATE([#FormSubmitted], ALL(EmpFact[Employee Category]))/ CALCULATE([TotalEmployees], ALL(EmpFact[Employee Category]))

Hi.

that wont work unfortunately, as now Category B does not show for Manager 100.
All that should show for Manager 100 is:

Category A: 100%

Category B: 0%

Category C: 100% 

@wilson_smyth

 

Click on the graph and on Axis section on Visualisations Pane do right click on the down arrow on "Employee Category"and select "Show Items with no data"

 

 

Excellent, i did not know this option existed! Thank you for your expertise!


Out of curosity, for educational purposes, id still like to know if this is solvable using just measures and filters.

@wilson_smyth

Possibly but i have never tried to see if i can get the same results by modifying a DAX formula

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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