Forum Discussion
Cumulative in a graph
Hi Feilin,
Can you share a dummy sample, please? That would make it easy for us to discuss this case.
Best Regards,
Dale
- Feilin7 years agoHelper II
Ok, sure:
So, the report view looks like this. I want it to be cumulative on the X-axis, which is the rounds. I really struggle on how to build the measure (like if it is supposed to be with SUM, SUMX, or something completely different). If I select a round through the droplist, the actual values should be unchanged, but the graph should only plot until the point that I have decided.
The roud is just an integer, like this. I specifically don't want it to be a date, so I cannot use the xTD functions for that.
And the actual data looks like this. In order to plot the entire graph at once (well, X-axis, at least), I have the "dummy serie" that just plots a 0 for each (maybe I could simplify that to just the first and the last, come think of it). It doesn't look nice, but I can live with it. Is it possible to have it like this to force it to plot the entire graph, and then somehow hide it from the legend? Also, it's not just one value for each serie and round, but a collection, which makes it perhaps more difficult. The category is not really relevant here, I should think (basically, the reason it is a collection is that each round calculates a sum of different values, which makes it important). I guess I could go back to the query editor and create a new table or something, which does some of the math to make it just one per serie and round, but I'd prefer not to, of course.
- v-jiascu-msft7 years agoMicrosoft Employee
Hi Feilin,
Maybe this solution. Please check out the demo in the attachment.
1. Create an independent [Round] table.
2. Create a measure.
Measure = VAR selectRound = SELECTEDVALUE ( SclierTable[Round] ) RETURN IF ( MIN ( RoundTable[Round] ) > selectRound && ISBLANK ( selectRound ) = FALSE (), 0, CALCULATE ( SUM ( Table1[Value] ), FILTER ( ALL ( RoundTable[Round] ), RoundTable[Round] <= MIN ( RoundTable[Round] ) ) ) )Best Regards,
Dale