Forum Discussion
column chart dynamic compare 3 periodes with filter
Hello to everyone
I need to build a column chart with different organizations in x-axis, the total sales in y-axis and this over three years compare with selected period (year, month, day).
Eg. Like this
But with selected filter period
Summarized: In the column chart, the current year + the last two years are to be compared according to the filter period.
I have solved the calculation for the last year with "SAMEPERIODLASTYEAR". With a created table for the axis + the following calculation I can compare at least 2 years dynamically:
However, I don't see a way to display the dynamic 3 years by company and selected period (filter) with the column chart in the example screen above. Does anyone have any input or a solution?
Thanks for Input
2 Replies
- danextian
Super User
Hi thebeginner1204 ,
What you're trying to achieve isnt achieveble out of the box but not impossible. That aisde, these are my questions:
- How do you define dynamic 3 years? So if today is Feb 10, that's YTD 2021, 2022 and 2023 or is it the full years? And since you have a calculation for SAMPERIODLASTYEAR, isn't 2023 being redundant.
- and to summarize, this is what you want:
- last 3 years,
- sameperiodlastyear?
- period selected?
- thebeginner1204
Helper I
Thank you very much for the feedback and the questions.
Dynamically 3 years should be defined with a date filter (see print screen above with selected period).
There the year 2014, month January / February and all days are selected. Calculating the current year is easy with SUM.
But I would also like to calculate the previous periods dynamically according to the filter selection. therefore year 2023, month Jauar / February all selected days.
Does that help?