Forum Discussion
Bookmark dynamic slicer
I have a site slicer in main page where it shows the current month data and a bookmark where I can there is site and period slicer. I can select any year and month over here. Is it possible to show this period slicer dynamically previous month.
Example : If the current month is March, when I select the bookmark the period slicer should be Feb.
TIA
2 Replies
- MAwwadSolution Sage
Yes, it is possible to show the previous month in the period slicer dynamically in Power BI. To do this, you can use a measure to calculate the previous month and use this measure as the default value for the period slicer.
Try
Previous Month = VAR CurrentMonth = MONTH(TODAY()) VAR CurrentYear = YEAR(TODAY()) RETURN IF( CurrentMonth = 1, DATE(CurrentYear - 1, 12, 1), DATE(CurrentYear, CurrentMonth - 1, 1) )
- Prabha45Helper III
If I apply this measure, will I be able to select others months as well ?
Bookmark page dynamically should show previous month and also I should be able to select other months and years as well