Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
Thank you
Solved! Go to 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]
)
@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]
)
@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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |