Forum Discussion
Anonymous
6 years agoNot applicable
Problem with Cumulative Sum
After jdbuchanan71 helped me with this one (https://community.powerbi.com/t5/Desktop/Evolution-Cumulative-Sum/m-p/757213#M364895 ), a new problem has come up: I have a running total calcul...
- Anonymous6 years ago
Got it a few days ago:
Created two measures:
First one:
#Notes closed in the past week = var currentweek = MAX(tab_Notas[Closing Week]) var lastweek = currentweek - 1 return CALCULATE( [#Notas encerradas]; tab_Notas[Closing Week] <= lastweek )And the second one is what I was looking for:
#Evolution = var currentweek = MAX(tab_Notas[Closing Week]) var lastweek = lastweek - 1 return IF([#Notas encerradas] > 0; [.Total de Notas] - [.#RT Week]; //TRUE CALCULATE( //FALSE [.Total de Notas] - [#Notes closed in the past week]; ALL(tab_Notas[Closing Week]); tab_Notas[Closing Week] <= lastweek ) )Regards,
Thiago Izidoro.
v-chuncz-msft
6 years agoCommunity Support
Anonymous
It seems that you may use the code below.
RETURN
[.Total de Notas]
- CALCULATE (
[#Notas encerradas],
tab_Notas[Semana Data Encerramento] <= CurrentWeek
)Anonymous
6 years agoNot applicable
Got it a few days ago:
Created two measures:
First one:
#Notes closed in the past week =
var currentweek = MAX(tab_Notas[Closing Week])
var lastweek = currentweek - 1
return
CALCULATE(
[#Notas encerradas];
tab_Notas[Closing Week] <= lastweek
)And the second one is what I was looking for:
#Evolution =
var currentweek = MAX(tab_Notas[Closing Week])
var lastweek = lastweek - 1
return
IF([#Notas encerradas] > 0;
[.Total de Notas] - [.#RT Week]; //TRUE
CALCULATE( //FALSE
[.Total de Notas] - [#Notes closed in the past week];
ALL(tab_Notas[Closing Week]);
tab_Notas[Closing Week] <= lastweek
)
)
Regards,
Thiago Izidoro.