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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
gregv5577
Regular Visitor

using ALL or ALLEXCEPT to create measure which ignores multiple slicers

I have a report which generates several versions of the same measure using or ignoring specific slicer selections. I can only get this to work if I construct my slicers from the fact table itself. I could just carry my labels on my fact table but that seems pretty messy. I'm either using the wrong DAX or I have to change the way my fact and dimension tables realate to one another. Below is a look at the statement which does work but only when I focus everything on the fact table. Also there is a simplified picture of the data. Any suggestions would be appreciated. Thanks. 

 

Measure 3 = CALCULATE(AVERAGE(OrderFactTable[Revenue]), ALL(OrderFactTable[employee_id], OrderFactTable[product_id]))

 

This works but I'd prefer to do something like this below. Can't seem to get the DAX. 

 

Measure 3 = CALCULATE(AVERAGE(OrderFactTable[Revenue]),ALL(Employee[employee_name], Product[product_name]))

 

image.png

 

 

 

2 ACCEPTED SOLUTIONS
v-qiuyu-msft
Community Support
Community Support

Hi @gregv5577,

 

You can create measures below: 

Measure 1 = AVERAGE('OrderFactTable'[revenue])

Measure 2 =
DIVIDE(CALCULATE (
SUM ( OrderFactTable[revenue] ),
ALL ( Employee[employee_name] )
), CALCULATE (
DISTINCTCOUNT(OrderFactTable[product_id]),
ALL ( Employee[employee_name] )
) )

 

Measure 3 =
DIVIDE(CALCULATE (
SUM ( OrderFactTable[revenue] ),
ALL ( Employee[employee_name] ),ALL('Product'[product_name])),
CALCULATE (
DISTINCTCOUNT(OrderFactTable[company_id]),
ALL ( Employee[employee_name] ),ALL('Product'[product_name])))

 

q1.PNG

 

You can see attached pbix file. 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

BILASolution
Solution Specialist
Solution Specialist

Hi @gregv5577

 

As an alternative...

 

rr.png

 

 

Measures:

 

Total Revenue = SUM(OrderFactTable[revenue]) 
Measure 1 = [Total Revenue] 
Measure 2 = CALCULATE([Total Revenue];ALL(Employee[Employee_name]) )
Measure 3 = CALCULATE([Total Revenue];ALL(Employee[Employee_name]);ALL('Product'[Product_name]))

I hope this helps

 

Regards

BILASolution

View solution in original post

4 REPLIES 4
BILASolution
Solution Specialist
Solution Specialist

Hi @gregv5577

 

As an alternative...

 

rr.png

 

 

Measures:

 

Total Revenue = SUM(OrderFactTable[revenue]) 
Measure 1 = [Total Revenue] 
Measure 2 = CALCULATE([Total Revenue];ALL(Employee[Employee_name]) )
Measure 3 = CALCULATE([Total Revenue];ALL(Employee[Employee_name]);ALL('Product'[Product_name]))

I hope this helps

 

Regards

BILASolution

Thanks very much. This is perfect. 

Hi @gregv5577,

 

If our suggestions meet your requirement, would you please mark helpful replies as answers so we can close this thread? Smiley Happy

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-qiuyu-msft
Community Support
Community Support

Hi @gregv5577,

 

You can create measures below: 

Measure 1 = AVERAGE('OrderFactTable'[revenue])

Measure 2 =
DIVIDE(CALCULATE (
SUM ( OrderFactTable[revenue] ),
ALL ( Employee[employee_name] )
), CALCULATE (
DISTINCTCOUNT(OrderFactTable[product_id]),
ALL ( Employee[employee_name] )
) )

 

Measure 3 =
DIVIDE(CALCULATE (
SUM ( OrderFactTable[revenue] ),
ALL ( Employee[employee_name] ),ALL('Product'[product_name])),
CALCULATE (
DISTINCTCOUNT(OrderFactTable[company_id]),
ALL ( Employee[employee_name] ),ALL('Product'[product_name])))

 

q1.PNG

 

You can see attached pbix file. 

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.