Forum Discussion
sparvez
2 years agoHelper I
Display Sum
Hello Altruists, A Table is given like below. "Week" will be increased or decreased randomly. Person-- Week1-- Week2-- Week3-- ... Hoover-- 2-- 13-- 30-- ... Franklin-- 8-...
Daniel29195
2 years agoCommunity Champion
hello , sparvez
you need to unpivot your table from power query first.
then you need a cumulative measure :
try using the following :
calculate (
sum( table[col] ,
all(dimdate) ,
dimdate[date] <= max(dimdate[date])
)
or you can use window function :
Measure 11 =
CALCULATE(
SUM('Table (13)'[Value]),
CALCULATETABLE(
WINDOW(
0,
ABS,
1,
SUMMARIZE(
'Table (13)',
'Table (13)'[Index],
'Table (13)'[Person],
'Table (13)'[week nb]
),
ORDERBY('Table (13)'[week nb] , asc)
),
all('Table (13)'[week nb]),
'Table (13)'[week nb] <= MAX('Table (13)'[week nb])
))
hope this is what you are looking for.
best regards
- sparvez2 years agoHelper I
Hi, I get error, can u pls upload the power BI file ? thanks
- Daniel291952 years agoCommunity Champion
- sparvez2 years agoHelper I
Hi, sorry, failed to open it, may be version issue. Could you please copy paste here the entire text of "Advanced Editor" ? Thank you again