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 data field .. i drag that field in dropdown box .. so i want automtically selection on yesterday dates
means if today is march 5, 2020 .. then i want march 4, 2020 selection when ever i open the report'
if tommorrow is march 6, 2020 then date om dropdown should be march 5,2020
any help
yet i did not try anything
Check if, this
https://community.powerbi.com/t5/Desktop/Setting-default-date-slicer-to-yesterday/td-p/523171
or
https://www.youtube.com/watch?v=lkHFpmA4SJ4
can help
Hi, @Bakhtawar
Based on your description, I created data to reproduce your scenario.
DateTable = CALENDAR(DATE(2020,1,1),DATE(2020,6,30))
You may create two measures as follows.
IsYesterday =
IF(
TODAY()-1 = MAX(DateTable[Date]),
1,0
)
IsTomorrow =
IF(
TODAY()+1 = MAX(DateTable[Date]),
1,0
)
Then you can create two slicers with Date column and put the measure to the corresponding visual level filter of the visual. Today is 3/6/2020. Here is the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i tried your solution and it worked @v-alq-msft but i want to displayed date instead of ALL text ? is this possible .. like now ALL is dsiplayed when i opened report.. but i want to displayed date instead of ALL
Hi, @Bakhtawar
You need to click the icon because the slicer is dropdown type.
For convenience, you may change it to 'list'.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
i know.. but i dont want this "ALL" text.. i want to just display date instead of ALL text.. means no need for selection/click
Hi, @Bakhtawar
Based on my tests, I think it is unsupported to select a value in a slicer automatically by default. The selectable value of a slicer changes with the context, but the selected value cannot be changed automatically. So you can see yesterday is selectable. However it can't be selected automatically.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ok is this possible to display other dates with highlight of yesterday date in dropdown .. it seems like only yesterday date is displayed.. if we want to display other date with highlight of yesterday date ? then is this possible.. however your solution is worked for display date @v-alq-msft
In case you want only one measure do it like
Yesterday = CALCULATE(SUM(Sales[Sales Amount]),'Date'[Date] =Today()-1)
For everything, use relative date slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Appreciate your Kudos.
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 |
---|---|
111 | |
94 | |
83 | |
67 | |
59 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |