The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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
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) )
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