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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
cboelterGNH
Frequent Visitor

How to show all Rows in matrix Even if there is no data

Hi,

I have a client-request that wants to show all rows of a Dimension Table (In this case all of the specific Departments) even when there are no values.

Example: a filter is set for a weekend and only one department works that weekend, so all departments will show 0 except one.

There are 44 Departments Total. The Dax is:

Example Hours = SUM(Fact_Timecards[Hours]) + 0

Below is what we don't want to happen (removing departments), the code field is the one from the Dimension Table. (I'm also using the show data with no values setting on the Rows [Code], clearly is not working).

2024-06-20 15_40_34-Overtime.png
Here is a look at the Model for Reference
2024-06-20 15_39_58-Hours.png

Though when I disactivate the relationship, I get the familiar repeated-value.

2024-06-20 15_43_33-Overtime.png

Any suggestions is welome, thank you.

1 ACCEPTED SOLUTION
aduguid
Super User
Super User

If you change the relationship to "Both" from Fact_Timecards to DepartmentCodes, it should work.

aduguid_1-1718923610675.png

 

aduguid_0-1718923593306.png

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @cboelterGNH ,

You can follow the steps below to get it:

1. Delete the relationship between the table 'Fact_Timecards' and 'DepartmentCodes'

2. Create a measure as below

Measure_ExampleHours =
VAR _code =
    SELECTEDVALUE ( 'DepartmentCodes'[Code] )
RETURN
    CALCULATE (
        SUM ( 'Fact_Timecards'[Example Hours] ),
        FILTER ( 'Fact_Timecards', 'Fact_Timecards'[Home Department-9999XX] = _code )
    )

3. Put the above measure onto the Values field to replace the original one

vyiruanmsft_0-1719194235140.png

Best Regards

aduguid
Super User
Super User

If you change the relationship to "Both" from Fact_Timecards to DepartmentCodes, it should work.

aduguid_1-1718923610675.png

 

aduguid_0-1718923593306.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.