Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello, all
I have the following problem: from a database that contains a date column; country column; city column and an event name column, I want to display a line chart that accounts for the accumulated number of events through time in each location.
This sounds rather easy, and solvable by applyng a Running Total measure. The question is, if I do that, I am not able to display the values in between dates. So if there was a Marathon in New York in March and another in May, my graph will display the Running Total as 1 for March, there will be no data point in April (although visually it will look like a 1.5) and 2 for May. This becomes a problem when I try to also display the share of Marathons that cumulatvely took place in each city in April.
The other option I tried to implement was the Running Total column, which would eliminate the missing date issue by creating data points for every date, containing the cumulative value. However, this means sacrificing my ability to filter the data, let's say, by country, beacause the calculated column is statical and is not recalculated once I select a subset of my data.
I understand describing the problem without the sample or screen capptures is very subjective, but I have been stuck with this for the past few days, and any ideas would be greatly appreciated.
Thanks in advance.
Hi @mrs13
Definitely stick with the calculated measure approach, so you can keep it dynamic.
Can you please share the code you are using for your calculated measure?
Hello, Phil
Thanks for your answer. I am using the following code:
Running Total =
CALCULATE(
COUNTA('Database'[Events]);
FILTER(
ALL('Database'[Date]);
ISONORAFTER('Database'[Date]; MIN('Database'[Date]); DESC)
)
)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 34 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 65 | |
| 44 | |
| 30 | |
| 28 |