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
mwegener
7 years agoMost Valuable Professional
Hi Stuznet
Measure = CALCULATE([Row2]+[Row3],FILTER(ALLSELECTED(Table1),Table1[Month Num] <= Max(Table1[Month Num])))
Stuznet
7 years agoHelper V
I wish I can share the data, but my work computer is pretty locked down. I did try the 2nd functions you provided, I'm not getting the correct results.
Is there a way I can write a Cumulative with Conditional?
For Example,
Measure = If [Row 3] <> BLANK(), Sum [Row 2] that is not BLANK