Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I need a urgent help on one of my requirement on the Slicer. The requirement is we need to have a Slicer with lastest three month dates as default but it should also allow us to select the prior dates.
Suppose I have data from Feb 2020 till Jan 2021 then the default slicer should start from 1st Nov 2020 till 31st Jan 2021 but if I need the data to check from 1st March 2020 till Jan 2021 then the filter should allow us to select these dates.
Please let me know if there is a work around on the same.
Thanks in advance.
Solved! Go to Solution.
@niteshtrehan89 , You can check if the relative date slicer can fit in you need https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Else you have to follow the approach to have a column that acts as a flag.
The first option I suggested will have dates other than three months .
Hi @niteshtrehan89,
Unfortunately, current power bi does not support setting the default value of the slicer. You can take a look at the following methods if they suitable for your scenario.
If your field stores the regular date value, you can use this on slicer with 'relative' mode and choose 'last' 3 'month' then it will keep the specific range of records based on current date field values.
In addition, you can also create a calculated column to shows the 'tag' based on 'if statement' which compares with 'current date' and 'last date'. Then you can use this on a filter to choose matched tags to filter records.
If above methods not help, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @niteshtrehan89,
Unfortunately, current power bi does not support setting the default value of the slicer. You can take a look at the following methods if they suitable for your scenario.
If your field stores the regular date value, you can use this on slicer with 'relative' mode and choose 'last' 3 'month' then it will keep the specific range of records based on current date field values.
In addition, you can also create a calculated column to shows the 'tag' based on 'if statement' which compares with 'current date' and 'last date'. Then you can use this on a filter to choose matched tags to filter records.
If above methods not help, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
the slicer is consisting the dates. I need to select the dates from the slicer.
@niteshtrehan89 , You can check if the relative date slicer can fit in you need https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Else you have to follow the approach to have a column that acts as a flag.
The first option I suggested will have dates other than three months .
@niteshtrehan89 ,You can create a column like
last three month =
Switch( True(),
[Date] >= eomonth(today(),-4)+1 && [Date] <= eomonth(today(),-1) ,"Last three " ,
[Date] & ""
)
or
last three month =
Switch( True(),
[Date] >= eomonth(today(),-4)+1 && [Date] <= eomonth(today(),-1) ,"Last three " ,
"Other dates"
)
and select Last three months from slicers
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
100 | |
76 | |
74 | |
49 |
User | Count |
---|---|
146 | |
108 | |
106 | |
90 | |
62 |