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 have a between date slicer and I need it to load to the most current date when the report is open. I also need to be able to still select a different date in the past as well. Is there a workaround that allows you to anchor a slicer to the current date
Solved! Go to Solution.
Hi @Anonymous ,
You could create a new date table and a measure to implement it. Please reference the steps to have a try.
Calendar = CALENDARAUTO()
Measure =
var a = SELECTEDVALUE('Calendar'[Date])
var b = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] = a))
var c = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] = TODAY()))
return
IF(ISFILTERED('Calendar'[Date]),b,c
)
Measure 2 =
var b = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] >= MIN('Calendar'[Date]) && 'Table'[Date] <= MAX('Calendar'[Date]) ))
var c = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] = TODAY()))
return
IF(ISFILTERED('Calendar'[Date]),b,c
)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I need something that will work with my current slicer. I need for when the report opens to display the data for today but still be able to go back and look at the data for say 01/02/2020 for example
Hi @Anonymous ,
You could create a new date table and a measure to implement it. Please reference the steps to have a try.
Calendar = CALENDARAUTO()
Measure =
var a = SELECTEDVALUE('Calendar'[Date])
var b = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] = a))
var c = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] = TODAY()))
return
IF(ISFILTERED('Calendar'[Date]),b,c
)
Measure 2 =
var b = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] >= MIN('Calendar'[Date]) && 'Table'[Date] <= MAX('Calendar'[Date]) ))
var c = CALCULATE(SUM('Table'[ Sales]),FILTER('Table','Table'[Date] = TODAY()))
return
IF(ISFILTERED('Calendar'[Date]),b,c
)
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Refer
https://www.youtube.com/watch?v=lkHFpmA4SJ4
https://community.powerbi.com/t5/Desktop/Show-only-data-from-the-latest-date/td-p/442889
https://community.powerbi.com/t5/Desktop/Set-TODAY-as-default-date-in-slicer-visual/td-p/488670
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 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |