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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
shaunguyver
Helper III
Helper III

DAX help

I have the following DAX formula that isn't working.

 

As you can see, I'm trying to sum a value in 'Headcount' by specifying corresponding values in neighbouring column 'BU'.

 

However, I also want to keep certain page-level filters.

 

Can anyone fix my formula? Thanks in advance

 

Total Headcount - Fixed = 
    CALCULATE(
	SUM(Occupancy[Headcount]),
		Occupancy[BU] IN {"Marketing", "Sales", "Head Office", "Support", "Ops", "IT", "Senior Team"}
) + 0
ALL('Real Estate'[Building]),
ALL('Real Estate'[City]),
ALL('Real Estate'[Country]),
ALL('Real Estate'[Region]))
1 ACCEPTED SOLUTION
DaFloDo
Resolver I
Resolver I

hi @shaunguyver,

 

i am not sure, but you could try ALLEXCEPT within the CALCULATE

 

Total Headcount - Fixed = 
    CALCULATE(
		SUM(Occupancy[Headcount])
		, ALLEXCEPT('Real Estate', 'Real Estate'[Building],'Real Estate'[City], 'Real Estate'[Country],'Real Estate'[Region])
		, Occupancy[BU] IN {"Marketing", "Sales", "Head Office", "Support", "Ops", "IT", "Senior Team"}
) + 0

 

 

regards 

 

florian

View solution in original post

1 REPLY 1
DaFloDo
Resolver I
Resolver I

hi @shaunguyver,

 

i am not sure, but you could try ALLEXCEPT within the CALCULATE

 

Total Headcount - Fixed = 
    CALCULATE(
		SUM(Occupancy[Headcount])
		, ALLEXCEPT('Real Estate', 'Real Estate'[Building],'Real Estate'[City], 'Real Estate'[Country],'Real Estate'[Region])
		, Occupancy[BU] IN {"Marketing", "Sales", "Head Office", "Support", "Ops", "IT", "Senior Team"}
) + 0

 

 

regards 

 

florian

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.