Forum Discussion
% difference between years for average sales
Hi,
I have a situation where I have sales data from across the years. I would like to show on average what is the % change from one year to the other based on slicer selection. Something like the table low.
I would like to show the % difference between lets say 2018 to 2021 in a line graph based on slicer selection. I have tried to use DAX measures but I cant seem to get it work.
Can anyone please help me on this?
Thanks in advance
9 Replies
- FreemanZSuper User
what will you put on the x-axis of the line graph?
can i say 2018 is the minimum and 2021 is the maximum of the slicer selection?
- mfaraliFrequent Visitor
not really, the difference could be any year vs any year (as chosen in the slicer)
So the viewer could select 2019 and 2021. or 2018 and 2019. or any other combo that they want to see the % difference for.
- FreemanZSuper User
so in any selection, the difference is a single value, why being plotted with year on the x axis?
- mfaraliFrequent Visitor
the difference is a single value if only 2 years are selected. but if the viewer wants to see the trend then they can select more than 2 years to see the changes in %
like choosing to see 2018, 2019, 2020 if they wanted to