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.
I had created a dashboard with time slicer. My date ranges, say from 2011 to till date of 2016. I had published the dashboard into power bi. Let us assume that the date selected in the time slicer is 01/01/2016 and 15/12/2016. The data gets populated through live connection.
Hence when someone runs the dashboard on 17/12/2016, data till 16/12/2016 will be available to view. but the selected date will point to 01/01/2016 to 15/12/2016, instead of 01/01/2016 to 16/12/2016. In other words, the user has to manually adjust the date to set it to current year's date range till date.
My problem is that I want to automatically update the time slicer selected date. For instance, assume that data is available till 17/01/2017. Hence the current year is 2017 and the selected date should be from 01/01/2017 to 17/01/2017 in the time slicer for the user to view. Please note that data from other dates (2016) will also be available but the selection date of the slicer should point to starting date of the current year to current date of the current year.
Solved! Go to Solution.
Hi @Bhoobala_P,
In your scenario, create a calendar table and create relationship between calendar table and your original table.
Then create a new column using the following formula in the calendar table, create a slicer using the new column and select 1 as default value in the slicer. For more deatils, please review the example in this attached PBIX file.
Column = IF('Date'[Year]=YEAR(NOW())&& 'Date'[DateKey]<=TODAY()-1,1,0)
Thanks,
Lydia Zhang
Hi @Bhoobala_P,
In your scenario, create a calendar table and create relationship between calendar table and your original table.
Then create a new column using the following formula in the calendar table, create a slicer using the new column and select 1 as default value in the slicer. For more deatils, please review the example in this attached PBIX file.
Column = IF('Date'[Year]=YEAR(NOW())&& 'Date'[DateKey]<=TODAY()-1,1,0)
Thanks,
Lydia Zhang
In that case,You should only use Year Column as a slicer instead of Dates. This should give you the results of the currrent year with current dates.
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 |
---|---|
113 | |
97 | |
79 | |
73 | |
56 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |