Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
this is a simplified version of my project:
- una table with a column date and a colum A:
Date | A |
01-gen | 1 |
01-feb | 2 |
01-mar | 3 |
01-apr | 4 |
01-mag | 5 |
01-giu | 6 |
01-lug | 7 |
01-ago | 8 |
01-set | 9 |
01-ott | 10 |
01-nov | 11 |
01-dic | 12 |
- una table with a column date and a colum B (with empty values in some rows):
Date | B |
01-gen | 1 |
01-feb | 2 |
01-mar | 3 |
01-apr | |
01-mag | |
01-giu | |
01-lug | |
01-ago | |
01-set | |
01-ott | |
01-nov | |
01-dic |
- a table with dates (I created a link with the date column of the other 2 tables):
Data |
01-gen |
01-feb |
01-mar |
01-apr |
01-mag |
01-giu |
01-lug |
01-ago |
01-set |
01-ott |
01-nov |
01-dic |
I would like to create a measure that is the cumulative sum of A+B for each month:
Data | A | B | A+B | cumul A+B |
01-gen | 1 | 1 | 2 | 2 |
01-feb | 2 | 2 | 4 | 6 |
01-mar | 3 | 3 | 6 | 12 |
01-apr | 4 | 4 | 16 | |
01-mag | 5 | 5 | 21 | |
01-giu | 6 | 6 | 27 | |
01-lug | 7 | 7 | 34 | |
01-ago | 8 | 8 | 42 | |
01-set | 9 | 9 | 51 | |
01-ott | 10 | 10 | 61 | |
01-nov | 11 | 11 | 72 | |
01-dic | 12 | 12 | 84 |
I'm able to calculate the cumulative sum if there are values in all rows of A and B but not if there are some empty values in one of the 2 columns A or B. In this case my formula gives a correct value from Jan to March but then gives values equal to A (if B is the column with empty values) from April to December.
Solved! Go to Solution.
Hi @corrado69 ,
Can you try the following formula?
CumulativeSum =
CALCULATE([SumOfAandB],FILTER(ALL(Date), DateTable[Date] <= MAX(DateTable[Date]))
Hi @corrado69 ,
Can you try the following formula?
CumulativeSum =
CALCULATE([SumOfAandB],FILTER(ALL(Date), DateTable[Date] <= MAX(DateTable[Date]))
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |