Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I'm building a report which will be used on an Ipad and I want to minimize the number of slicer selections needed for the user to make it more user friendly. I have a year slicer with single selection and I want to keep it that way.
I have a line chart where I want to show the selected year AND the year before. Problem is obviously with the single selection slicer. There is a "periodic table" that I use for all calendar dimensions and this is the source of the Year slicer in the report (this slicer is disconnected from the chart in question). In this periodic table I have created the following measures to try to solve the problem:
Selected year = SELECTEDVALUE(Periodic_table[Year]) <- collecting the year selected in the slicer
Prior year = [Selected year]-1
Filter = IF(
I hope its somewhat easy to follow! 😄
Would highly appreciate any help here.
Solved! Go to Solution.
@byggarebob , Based on what I got
In such a case slicer, need to be on an independent year/date table and then you can have measure like
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Year])
var _min = _max -1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Year] >=_min && 'Date'[Year] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
@byggarebob , Based on what I got
In such a case slicer, need to be on an independent year/date table and then you can have measure like
//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Year])
var _min = _max -1
return
calculate( sum(Table[Value]), filter('Date', 'Date'[Year] >=_min && 'Date'[Year] <=_max))
Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI
Your suggested solution worked! I only had to add a slicer linked to year in the independent date table and then sync that slicer to the "year"-slicer of the main date table. Thanks alot!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
79 | |
47 | |
45 | |
32 |
User | Count |
---|---|
172 | |
90 | |
66 | |
46 | |
45 |