Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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:
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).
Here is a look at the Model for Reference
Though when I disactivate the relationship, I get the familiar repeated-value.
Any suggestions is welome, thank you.
Solved! Go to Solution.
If you change the relationship to "Both" from Fact_Timecards to DepartmentCodes, it should work.
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
Best Regards
If you change the relationship to "Both" from Fact_Timecards to DepartmentCodes, it should work.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
14 | |
12 | |
8 | |
8 |