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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
dyee4613
Helper I
Helper I

Calculate ALL Help

Hi.  I have a some data has the following data: Contract, Date ,Employee, Hours, Task.  Here is a table w/ hours summarized at the contract level.

 

ContractHours
ABC1000
CDE2000
EFG3000


I want to be able to filter by date/contract but ignore task.  I figure the calculation is Contract Hours = Calculate(SUM[Hours]),ALL(Task))


Here is my expectation.

ContractTaskContract HoursHours
ABC11000250
ABC21000250
ABC31000250
ABC41000250
CDE12000500
CDE22000500
CDE32000500
CDE42000500
EFG13000600
EFG23000600
EFG33000600
EFG43000600
EFG53000600

 

However, the results are very different.  I figure this should be a pretty easy but I'm definitely missing something.  

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @dyee4613 , I tested your measure and it works well to display your expectation in the table visual. I also tested another measure using ALLEXCEPT function which also works as below. Can you check or confirm is there any other fields used in the visual or any filters applied which may affect the context for the measure?

 

Contract Hours = Calculate(SUM('Table (2)'[Hours]),ALL('Table (2)'[Task]))
Contract Hours 2 = Calculate(SUM('Table (2)'[Hours]),ALLEXCEPT('Table (2)','Table (2)'[Contract]))

 

Here is the sample data I used:

v-jingzhang_0-1600939884288.png

And the table visual result:

v-jingzhang_1-1600939884291.png

 

Best Regards,

Community Support Team _ Jing Zhang

If this post helps, please consider Accept it as the solution to help other members find it.

PaulDBrown
Community Champion
Community Champion

@dyee4613 

Using  ALLEXCEPT(table, table[contract]) as the filter expression will solve this. However, as always, it depends on how your model is set up and which fields you are using (Dimension tables, date table...) in your target visual.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.