Forum Discussion
Stuznet
7 years agoHelper V
Cumulative Sum of 2 Rows
Hi guys, Above is the formula I created in Excel. Row 4 is what I'm trying to create in Power BI, but I'm not sure how do I achieve that. Here is the Dax function I wrote but ...
- 7 years ago
Hi Stuznet
Row3 = VAR Row1Sum = CALCULATE(DIVIDE([Total];2);FILTER(ALLSELECTED(Data);Data[Month Num] <= MAX(Data[Month Num]) && Data[Month Num] +1 >= MONTH(TODAY()))) VAR Row2Sum = CALCULATE(DIVIDE([Total];2);FILTER(ALLSELECTED(Data);Data[Month Num] <= MAX(Data[Month Num]) && Data[Month Num] +2 <= MONTH(TODAY()) && Data[ROW] <> BLANK())) RETURN Row1Sum + Row2Sum
Ashish_Mathur
7 years agoSuper User
Hi,
What is actually there in the first column. Are they years by any chance? Can you share your PBI file with dummy figures?
Stuznet
7 years agoHelper V
Here is the dummy report Cumulative Sum of 2 Rows, it is exactly what I'm trying to achieve on my active report.
Row 3 accumulating from Row 2. IF November and December <> BLANK(), I want it to accumulate from Row1 starting from October to December.
Note: Row 3 November to December number is the wrong result.
Thank you so you so much for looking into this.
- mwegener7 years agoMost Valuable Professional
Hi Stuznet
Row3 = VAR Row1Sum = CALCULATE(DIVIDE([Total];2);FILTER(ALLSELECTED(Data);Data[Month Num] <= MAX(Data[Month Num]) && Data[Month Num] +1 >= MONTH(TODAY()))) VAR Row2Sum = CALCULATE(DIVIDE([Total];2);FILTER(ALLSELECTED(Data);Data[Month Num] <= MAX(Data[Month Num]) && Data[Month Num] +2 <= MONTH(TODAY()) && Data[ROW] <> BLANK())) RETURN Row1Sum + Row2Sum
- Ashish_Mathur7 years agoSuper User
Hi,
Sorry i cannot help with this one.