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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Timoneedhelp
New Member

CALCULATE SUM with FILTER

Good morning Community,

 

I hope you can help me. Here is the structure of the table.

 

Product LineProduct  No.Product  NameMaterial No.CountryCalendar yearProduct  %
A5555511111Product A1111BR202110
A5555511111Product A2222US202120
B5555511111Product A2222US202120
B5555511111Product A3333CA202150

 

What I expect: The sum of  Product/Country/Year in each line (see below).

Product LineProduct  No.Product  NameMaterial No.CountryCalendar yearProduct  %SUM
A5555511111Product A1111BR20211010
A5555511111Product A2222US20212040
B5555511111Product A2222US20212040
B5555511111Product A3333CA20215050

 

I tried the following:

Support = CONCATENATE(ProductNo), CONCATENATE(Country),(YEAR)

 

CALCULATE(

   SUM(Product %),

   ALLSELECTED(Support)

 )

 

Result is the same as in Product%

 

Does anyone have an idea?

Timo

 

 

1 ACCEPTED SOLUTION
Timoneedhelp
New Member

sometimes the easy way is the beste way....

 

Support = CONCATENATE(ProductNo), CONCATENATE(Country),(YEAR)

 
CALCULATE(
    SUM(Product%),
    ALLEXCEPT('Table','Table'[Support]
)
 

View solution in original post

6 REPLIES 6
Timoneedhelp
New Member

sometimes the easy way is the beste way....

 

Support = CONCATENATE(ProductNo), CONCATENATE(Country),(YEAR)

 
CALCULATE(
    SUM(Product%),
    ALLEXCEPT('Table','Table'[Support]
)
 
tamerj1
Super User
Super User

HI @Timoneedhelp 
You may try

RT % =
VAR CurrentValue = [Product %]
RETURN
    SUMX ( FILTER ( ALL ( Table ), [Product %] <= CurrentValue ), [Product %] )

Hi @tamerj1 ,

Thanks for the quick reply. It calculates... for almost more than 30 minutes (more than 350k lines) and I am curious how long it takes and how the result is... I will report 😉

@Timoneedhelp 
Can you please share a screenshot of your table visual and the mesures code?

@tamerj1 I will send you a screenshot when the calculation is done...

 

In the table visual it is possible to get a SUM via the "Support = CONCATENATE(ProductNo), CONCATENATE(Country),(YEAR)" column, but I need the SUM in a seperate table to create a map with volume.

 

So my next step is a lookupvalue to the following table

 

ProductNoCountryYearSupport2 = CONCATENATE(ProductNo), CONCATENATE(Country),(YEAR)Result of Calculation via Lookupvalue

😅

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.