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.
Hello,
I want to build a bar chart race and I want to show cumulative data according to the date, filtering by the person's name, like this:
Created at | Name | Count | Cumulative |
01/05/2019 | A | 1 | 1 |
02/05/2019 | A | 1 | 2 |
03/05/2019 | A | 1 | 3 |
04/05/2019 | B | 1 | 1 |
02/05/2019 | B | 1 | 2 |
03/05/2019 | B | 1 | 3 |
03/05/2019 | B | 1 | 4 |
As I add more data to the chart, I want this new data to be counted as well.
I created a new column named "Cumulative" and I used this DAX formula:
CALCULATE (
SUM ('Base consolidada'[Count]),
FILTER (ALL ('Base consolidada'[Created at] ),'Base consolidada'[Created at] <= MAX ( 'Base consolidada'[Created at]))
)
However, this formula didn't work, and I am looking for a formula that works.
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
For your requirement, I'm afraid that you'd better create the measure with the formula below.
Measure = CALCULATE ( SUM ( 'Base consolidada'[Count] ), FILTER ( ALL ( 'Base consolidada' ), 'Base consolidada'[Created at] <= MAX ( 'Base consolidada'[Created at] ) && 'Base consolidada'[Name] = MAX ( 'Base consolidada'[Name] ) ) )
Here is the output.
Best Regards,
Cherry
Hi @Anonymous ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, pleaes feel free to ask.
Best Regards,
Cherry
The formula worked perfectly but i had to use ALLSELECTED instead of ALL so it would only give me the dates i selected from a slicer.
The only thing not workling properly is that the bar chart only counts a maximum of 31 days if you selected 2 months worth of data it adds all the days on each month.
How do you,
1. Increase the period from 31 days to whatever you filtered on the date slicer.
2. Not total both the day 1 up to day 31 of each month you have selected.
Hi @Anonymous ,
For your requirement, I'm afraid that you'd better create the measure with the formula below.
Measure = CALCULATE ( SUM ( 'Base consolidada'[Count] ), FILTER ( ALL ( 'Base consolidada' ), 'Base consolidada'[Created at] <= MAX ( 'Base consolidada'[Created at] ) && 'Base consolidada'[Name] = MAX ( 'Base consolidada'[Name] ) ) )
Here is the output.
Best Regards,
Cherry
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 |
---|---|
80 | |
79 | |
58 | |
36 | |
35 |
User | Count |
---|---|
99 | |
56 | |
56 | |
46 | |
40 |