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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

SUM Weekly

Hi good day,

Can anyone pls need help on my table for the new new column to get the SUM of PT pls refer below.

AllanBerces_0-1732265395629.png

 

AllanBerces_1-1732265505398.png

 

Thank you

 

1 ACCEPTED SOLUTION

Hi @nandic thank you for your reply, i got the solution on my problem.

 

SUM_PT =
SUMX (
FILTER (
SUMMARIZECOLUMNS (
'Table01'[Trade],
'Table01'[Week No.],
'Table01'[PT]
),
'Table01'[DPR_DATE] = EARLIER ( 'Table01'[DPR_DATE] )
&& 'Table01'[Trade] = EARLIER ( 'Table01'[Trade] )
&& 'Table01'[Week No.] = EARLIER ( 'Table01'[Week No.] )
),
'Table01'[PT]
)

View solution in original post

4 REPLIES 4
nandic
Resident Rockstar
Resident Rockstar

@AllanBerces in that case, i suppose there are some additional columns which make each row unique.
Based on provided screenshot, for PT 200 we have 4 same rows.

Formula that i provided in previous reply would do 200 * 4 and return 800.
So we need to find makes rows unique to tell in formula to return only the first or last row, otherwise it will multiply.

Cheers,
Nemanja

Hi @nandic thank you for your reply, i got the solution on my problem.

 

SUM_PT =
SUMX (
FILTER (
SUMMARIZECOLUMNS (
'Table01'[Trade],
'Table01'[Week No.],
'Table01'[PT]
),
'Table01'[DPR_DATE] = EARLIER ( 'Table01'[DPR_DATE] )
&& 'Table01'[Trade] = EARLIER ( 'Table01'[Trade] )
&& 'Table01'[Week No.] = EARLIER ( 'Table01'[Week No.] )
),
'Table01'[PT]
)

nandic
Resident Rockstar
Resident Rockstar

@AllanBerces , could you share current calculation for column "SUM PT", how did you get 480 for week 46?
If you need to calculate sum of PT per week as calculated column, then you could use this logic:
Total PT per Week =
CALCULATE(
SUM(Table[PT]),
ALLEXCEPT(Table, Table[Week])
)

If you need to add also by year, then beside Table[Week] you would add Table[Year].

Cheers,
Nemanja

Hi @nandic for the 480 is the of below

AllanBerces_0-1732276287460.png

 

Thank you

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.