Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a dashboard which contains a slicer for user to select different month of data, the data will refreshed monthly. However, I don't know how to make the slicer automatically pointing to the latest month after each refresh, is this possible to do so in Power BI?
Solved! Go to Solution.
What I normally do is add another column I'm the calendar table that mirrors a unique month column, eg mmm-yyyy. Write a formula for the column (Power Query or DAX calc column, better in PQ, I think)) that returns "Current Month" for the active month and "mmm-yyyy" for the other months. Sort this on anothe unique month column such as mmm-yyyy or month end date. Once done, use this new column and set to "current month". Each month (during refresh), the actual current month changes but the slicer stays the same.
I have a 5 minute "Current Month Slicer" video here that might be be of use https://youtu.be/5dN4SqufENE
Hi @ckwongak
You can catch your selection with dax code :
If my answer was helpful please give me a Kudos and accept as a Solution.
But is it possible to show the Actual date in yyyy-mm-dd instead of "Currnet Date"/"Latest Date"?
Hi @ckwongak
You can catch your selection with dax code :
If my answer was helpful please give me a Kudos and accept as a Solution.
You will need to compromise, somewhere. You could put the new column i described in the filters pane and a card showing the actual date. I cannot think of a way to have a slicer showing the actual date AND allowing the user to select a different date.
I have a 5 minute "Current Month Slicer" video here that might be be of use https://youtu.be/5dN4SqufENE
Hi @ckwongak ,
Assuming I understand your needs correctly, the following tutorial may help:
https://www.youtube.com/watch?v=JlVHsZUk1nc
If my answer was helpful please give me a Kudos and accept as a Solution.
What I normally do is add another column I'm the calendar table that mirrors a unique month column, eg mmm-yyyy. Write a formula for the column (Power Query or DAX calc column, better in PQ, I think)) that returns "Current Month" for the active month and "mmm-yyyy" for the other months. Sort this on anothe unique month column such as mmm-yyyy or month end date. Once done, use this new column and set to "current month". Each month (during refresh), the actual current month changes but the slicer stays the same.
Hello there, this solution works really well. However, I am wondering if you have a solution for default loading to CurrentMonth when accessing the Power BI Service? Currently, my slicer loads to the month when the pbix was published.
User | Count |
---|---|
117 | |
74 | |
59 | |
51 | |
48 |
User | Count |
---|---|
171 | |
118 | |
60 | |
59 | |
54 |