Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! 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.
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 80 | |
| 49 | |
| 35 | |
| 31 | |
| 30 |