Forum Discussion
Use filters for specific colums in matrix
- 4 years ago
If you want to compare random fields e.g.:-
- 2022 vs 2019
- 2022 vs 2021
- 2021 vs 2015 ...
then you cant do it will 2 slicers on the same dataset,
because when you slice by 2022 the data will only be for 2022.
The solution is to use 2 copies of the data each with a slicer.
With no relationship with each other.Then have 3 measures:-
YearA = SUM(SalesfileA[value])
YearB = SUM(SalesfileB[value])
Difference = YearA - YearB
You can then have 2 slicer
SalesfileA[Year] and SalesfileB[Year]
You can imporve the solution using 2 Calendar tables, but the principle is the same.
Please click the thumbs up and Accept As Solution
Do you want to always compare previous year
eg 2009 to 2010, 2010 to 2011, 2011 to 2012
or do you need to compare 2009 to 2012?
You cant use a 2 silcers on the same date.
If you slice sales for 2020 then the seconds slicer will only show 2020.
The video link I gave you explains how to best compare years using an offset.
If you want to be a Power BI developer then I recommed you do the Calendar training again.
Thanks again,
I have to compare "offset" periods, but not allways the same ones
- 2022 vs 2019
- 2022 vs 2021
- 2021 vs 2015 ...
That's the reason why i have to use 2 parametres (current one and refference one)
But unfortunately i'm no able to do it ... for the moment ! may be my mind is too Excel-focused to solve it.
🙂
- speedramps4 years ago
Super User
If you want to compare random fields e.g.:-
- 2022 vs 2019
- 2022 vs 2021
- 2021 vs 2015 ...
then you cant do it will 2 slicers on the same dataset,
because when you slice by 2022 the data will only be for 2022.
The solution is to use 2 copies of the data each with a slicer.
With no relationship with each other.Then have 3 measures:-
YearA = SUM(SalesfileA[value])
YearB = SUM(SalesfileB[value])
Difference = YearA - YearB
You can then have 2 slicer
SalesfileA[Year] and SalesfileB[Year]
You can imporve the solution using 2 Calendar tables, but the principle is the same.
Please click the thumbs up and Accept As Solution
- octomore4 years agoNew Member
Thanks a lot for your help, you compleatly answer to my request.
Have a nice day/evening