Forum Discussion
Running Total without gaps
Hi,
I really hope someone can help. I've been using Dax for a while but I cannot figure out how to make ths work.
I have a running total where I'm getting no data inbetween data points like below;
So it looks like this;
Jan Feb Marc etc
1 0 1 1
2 1 0 2
3 0 0 0
4 2 0 0
5 3 2 3
I need it to look like this;
Jan Feb Marc etc
1 0 1 1
2 1 1 2
3 1 1 2
4 2 1 2
5 3 2 3
The dax being used is;
Breach Count running total Contract Col =
CALCULATE(
sum('Breach Month'[Breach Count Col]),
FILTER(
ALL('Breach Month'[Breach Month of Contract Col]),'Breach Month'[Breach Month of Contract Col] <=MAX('Breach Month'[Breach Month of Contract Col])
)
)
For the months across the top of the visual a column is being used in the same table as the rest of the data.
I've tried all the different ways of doing it that i can find in the community but they all do the same thing.
Thanks for your help!!
Al
6 Replies
- AlBCommunity Champion
Hi a_cutler
You need to show the tables in your data model involved in the calculations and explain how you are building the visual (what fields go where, etc.). Otherwise we can just guess.
Show your data in text-tabular format in addition to (or instead of) the screen captures. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).
- a_cutlerFrequent Visitor
Hi,
Thanks, I'm getting an error about the number of characters when I paste the table in - what's the best way to share it?
I've limited the table to 200 rows as that's what's needed to illustrate the issue.
Thanks,
Alan
- AlBCommunity Champion
You can share the URL to the file hosted elsewhere (Dropbox, OneDrive... or sites like tinyupload.com, where no sign-in is required)