Forum Discussion
Fixed Time Buttons for Table
- 4 years ago
Hi Anonymous,
May be you can try use the slicer like the following :
If this ok, create a measure as a dynamic tag and let it in filters pane.
Measure = var _2hours = NOW()-TIME(2,0,0) var _12hours = NOW()-TIME(12,0,0) var _24hours = NOW()-TIME(23,59,59) var _weekhours = NOW()-TIME(23,59,59)*7 var _month = NOW()-TIME(23,59,59)*30 return SWITCH(TRUE(), SELECTEDVALUE(Button[button])="2 hours",_2hours, SELECTEDVALUE(Button[button])="12 hours",_12hours, SELECTEDVALUE(Button[button])="24 hours",_24hours, SELECTEDVALUE(Button[button])="week",_weekhours, SELECTEDVALUE(Button[button])="month",_month,TIME(0,0,0)) Measure 2 = IF(SELECTEDVALUE('Table'[DateTime])>=[Measure],1,BLANK())If you want use button, bookmarks and slicer are used in combination. Bookmarks are linked to the specified slicer.
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , bookmarks and button
or measure slicer
Bookmarks
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://docs.microsoft.com/en-us/power-bi/desktop-bookmarks
measure slicer
https://www.youtube.com/watch?v=b9352Vxuj-M
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
Thank you for replying. Here is my data if it makes more sense for help. I do not think Bookmark and button works for it. I know how to use bookmark and blank button, please can give me more specific idea or other options ?