Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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]))
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
11 | |
10 | |
10 | |
10 |
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
8 |