Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I have a Date slicer on a page, and would like to default the slicer selection to previous month. For instance, today is 29/09/2022, and I would like to Slicer default to Aug 2022. I've tried the filter on page, using relative month, but it gives 29/08/2022 to 28/09/2022. This is not really what I need. Btw, I use Dec 2021 edition, and I don't use my own Data table. Not sure how to use it yet. Any suggestions would be much appreciated!. Thanks
Solved! Go to Solution.
Please check this one https://community.powerbi.com/t5/Desktop/Slicer-default-to-previous-month/td-p/2058015
Thanks,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series
Please check this one https://community.powerbi.com/t5/Desktop/Slicer-default-to-previous-month/td-p/2058015
Thanks,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !! PL 300 Certification Series
Hi,
You have to create new column in calender table to check it is previous month or not. then add that column to month slicer.
Use following code.
#"Added Custom" = Table.AddColumn(#"Changed Type", "Is Previous Month", each if Date.Month([Date]) = Date.Month(Date.AddMonths(DateTime.LocalNow(),-1)) then "Previous Month" else Date.MonthName([Date]))
in
#"Added Custom"
Thank you
User | Count |
---|---|
100 | |
89 | |
82 | |
76 | |
71 |
User | Count |
---|---|
113 | |
104 | |
100 | |
73 | |
65 |