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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
mlozano
Helper III
Helper III

Error Calculate

Hello, again looking for help in the community.

I find myself building a SUMIFS, which sums the LE Volume field, grouped by region and category.

 

The DAX I have at the moment is the following:

 

SUMIFS =
CALCULATE(
SUM(Worksheet[LE Volume]),
Worksheet[Region]=Worksheet[Region],
ALLEXCEPT(Worksheet, Worksheet[Month], Worksheet[Category]))

 

The result is:

 

without filters

mlozano_0-1654896790662.png

 

The result i get is correct as long as you do not apply any filter in the report. When I try to apply a filter by region, the result remains static and is not recalculated according to the selected region

 

with the filter "Reg Centro"

 

mlozano_1-1654897105753.png

 

how can I adjust my CALCULATE so that the result is dynamic and changes according to the selected region?

 

I share power bi file

PBI File 

 

1 ACCEPTED SOLUTION

I raised it in the following way and achieved the expected result.

Do you think it is a good alternative?

 

    CALCULATE(
        SUM(Worksheet[LE Volume]),
        KEEPFILTERS(Worksheet[Month]=Worksheet[Month]), KEEPFILTERS(Worksheet[Category]=Worksheet[Category]))

View solution in original post

4 REPLIES 4
HotChilli
Super User
Super User

Looks like you are over-thinking it.

Just use a simple SUM.  If you want a better model ,put Month and Category in dimension tables - linked 1:m with the main fact table

HotChilli
Super User
Super User

ALLEXCEPT removes all filters except the ones added as parameters.  So that's why it doesn't respond to a change in Region.

What is it you are trying to show in the visual? (because Abril is the only month in the data) - it looks like a simple SUM is what's required but maybe you can explain further

I raised it in the following way and achieved the expected result.

Do you think it is a good alternative?

 

    CALCULATE(
        SUM(Worksheet[LE Volume]),
        KEEPFILTERS(Worksheet[Month]=Worksheet[Month]), KEEPFILTERS(Worksheet[Category]=Worksheet[Category]))

I only want to find the sum of LE Volume grouped by month and category, that when filtering by region said calculation shows the result corresponding to each category according to the applied filters. The month is included because at some point the database will have more data per month.

 

ALLEXCEPT is the function that I have come closest to the result with, but even including the region field as a filter argument, my calculation remains static even when applying filters.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors