Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have created the below measure to give me a monthly baseline WO hours for the electrical team. This is used as a reference line in my bar chart. the issue I am running into is that if there are no WO hours for a facility then the baseline hours for that facility will not appear in the total. Currently, my total monthly hours is 700 but my reference line is only at 325 because not all facilities have had WO hours for the first 6 weeks of the year.
Any help updating the below measure to where i can get the total sum even if a facility has not had any hours?
MEASURE 'WOs'[Electric WO Baseline Measurev2] = VAR SelectedDivision = SELECTEDVALUE('WO Baseline hours'[Division])
VAR SelectedFacility = SELECTEDVALUE('WO Baseline hours'[Facility])
RETURN
IF(
ISFILTERED('WO Baseline hours'[Facility]),
CALCULATE(MAXX(
FILTER(
'WO Baseline hours',
'WO Baseline hours'[Division] = SelectedDivision && 'WO Baseline hours'[Facility] = SelectedFacility
),
'WO Baseline hours'[Electirc Baseline WO Hours]
)),
CALCULATE(SUMX(
FILTER(
'WO Baseline hours',
'WO Baseline hours'[Division] = SelectedDivision
),
'WO Baseline hours'[Electirc Baseline WO Hours]
))
)
Hi @Anonymous
I've read your dax, maybe you can try the all(), allselected(), allexcept(), and removefilter() functions to remove unwanted filtering effects.
Here's a blog about contextual filtering:
Understand the Filter Context and How to Control i... - Microsoft Fabric Community
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 63 | |
| 55 | |
| 42 | |
| 41 | |
| 23 |
| User | Count |
|---|---|
| 171 | |
| 136 | |
| 119 | |
| 79 | |
| 54 |