Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 63 | |
| 31 | |
| 30 | |
| 23 |