The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I need a date slicer (between-mode) that selects the most recent 24 houra data by default... while still allowing end-users to pick any other period (for both start and end dates).
From what I've seen, this is impossible to accomplish in PowerBI. Is that true?
Please help
Solved! Go to Solution.
Hi @shishanki ,
As far as I know, Power BI doesn't support us to set default date in slicer currently.
Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Set default date in slicer
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.
There is a workaround to achieve your goal by unrelated DimDate table and measure. By this way, you need to create two unrelated date tables for rangestart and rangeend.
My Sample:
Data model:
Measure:
Filter M =
VAR _RANGESTART =
SELECTEDVALUE ( RangeStart[Date] )
VAR _RANGEEND =
SELECTEDVALUE ( RangeEnd[Date] )
VAR _CURRENTDATE =
MAX ( 'Table'[Date] )
RETURN
IF (
ISFILTERED ( RangeStart[Date] ) && ISFILTERED ( RangeEnd[Date] ),
IF ( _CURRENTDATE >= _RANGESTART && _CURRENTDATE <= _RANGEEND, 1, 0 ),
IF ( _CURRENTDATE = TODAY (), 1, 0 )
)
Add this measure into visual level filter and set it to show items when value =1.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Any help will be appreciated.
Hi @shishanki ,
As far as I know, Power BI doesn't support us to set default date in slicer currently.
Your demand is a good idea, while it is not supported to implement in Power BI currently.
You can vote up this idea for this function:Set default date in slicer
Or you can submit a new idea to improve the Power BI.
It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.
There is a workaround to achieve your goal by unrelated DimDate table and measure. By this way, you need to create two unrelated date tables for rangestart and rangeend.
My Sample:
Data model:
Measure:
Filter M =
VAR _RANGESTART =
SELECTEDVALUE ( RangeStart[Date] )
VAR _RANGEEND =
SELECTEDVALUE ( RangeEnd[Date] )
VAR _CURRENTDATE =
MAX ( 'Table'[Date] )
RETURN
IF (
ISFILTERED ( RangeStart[Date] ) && ISFILTERED ( RangeEnd[Date] ),
IF ( _CURRENTDATE >= _RANGESTART && _CURRENTDATE <= _RANGEEND, 1, 0 ),
IF ( _CURRENTDATE = TODAY (), 1, 0 )
)
Add this measure into visual level filter and set it to show items when value =1.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.