Forum Discussion
Get two separate slicers for two separate measures
I have a flat file for the sales department with the product column. My goal is to have two slicers where the user can select only one product in each to perform a comparision in the total amount and the YoY amount. Previously, this was attained with two separate graphs (visuals) but the sales manager want me to aggregate it into only one visual to have the same X and Y axis and therefore be able to visually have the same proportion. The following image shows the current situation.
The goal is to aggregate the two graphs into one and have, for example, Amount A and Amount YoY A and Amount B and Amount YoY B that vary depending on the select values. I've tried to find a solution in similar threads but none seems to fit my requirements. What would you suggest?
goncalogeraldes , Interaction needs to control when you two slicer on the same column. But when you need two measures respond you need on independent table,
what I discussed here
How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg
what you are doing now is
How Interactions Work- Split Page using interactions to compare: https://youtu.be/GIfRKzhMaR4
3 Replies
- amitchandak
Super User
goncalogeraldes , for this year vs last year, you can use time intelligence
This will do with single slicer
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
Last YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],-1,Year),"12/31"))
This year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR('Date'[Date]),"12/31"))
Last year Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(ENDOFYEAR(dateadd('Date'[Date],-1,Year)),"12/31"))Or refer my video if you need two slicers
How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg
- goncalogeraldes
Super User
My main problem is not calculating the measures but rather the interactions between the two slicers and each separate measure. I know my explanation may be somewhat confusing...
- amitchandak
Super User
goncalogeraldes , Interaction needs to control when you two slicer on the same column. But when you need two measures respond you need on independent table,
what I discussed here
How to use two Date/Period slicers :https://www.youtube.com/watch?v=WSeZr_-MiTg
what you are doing now is
How Interactions Work- Split Page using interactions to compare: https://youtu.be/GIfRKzhMaR4