Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Abhishek_Singh_
Regular Visitor

Power bi Service

Hi Power bi Team,

When we refreshing in Power bi  in service , Month should automatically selected latest month in the Slicer. When Some one visite the power bi service click on Link latest month automatically selected in Slicer.

1 ACCEPTED SOLUTION
Poojara_D12
Super User
Super User

Hi @Abhishek_Singh_ 

To auto-select the latest month in a slicer in Power BI Service:

  1. Add a Column: Create a calculated column in your date table.

 

IsLatestMonth = IF(FORMAT('Date'[Date], "YYYY-MM") = FORMAT(TODAY(), "YYYY-MM"), 1, 0)

 

  • Set a Slicer: Use the "Month" field in a slicer and enable Single Select.

  • Apply Filter: Add a visual-level filter to the slicer: IsLatestMonth = 1.

  • Publish: Save and publish the report. After refresh, the slicer will auto-select the latest month.

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

View solution in original post

9 REPLIES 9
v-prasare
Community Support
Community Support

@Abhishek_Singh_ , As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by our community members helps you? or let us know if you need any further assistance here? 

 

Your feedback is important to us, Looking forward to your response.

 

Thanks,

Prashanth Are

MS Fabric community support.

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

v-prasare
Community Support
Community Support

@Abhishek_Singh_,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by our community members helps you? or let us know if you need any further assistance here? 

 

Your feedback is important to us, Looking forward to your response.

 

Thanks,

Prashanth Are

MS Fabric community support.

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

v-prasare
Community Support
Community Support

Hi @Abhishek_Singh_ , As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by our community members helps you? or let us know if you need any further assistance here? 

 

Your feedback is important to us, Looking forward to your response.

 

Thanks,

Prashanth Are

MS Fabric community support.

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

danextian
Super User
Super User

This can be done using the Tabular Editor with a few limitations. Please refer to this vid https://www.youtube.com/watch?v=MrEAZREQuXM 

 

 

 

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
Poojara_D12
Super User
Super User

Hi @Abhishek_Singh_ 

To auto-select the latest month in a slicer in Power BI Service:

  1. Add a Column: Create a calculated column in your date table.

 

IsLatestMonth = IF(FORMAT('Date'[Date], "YYYY-MM") = FORMAT(TODAY(), "YYYY-MM"), 1, 0)

 

  • Set a Slicer: Use the "Month" field in a slicer and enable Single Select.

  • Apply Filter: Add a visual-level filter to the slicer: IsLatestMonth = 1.

  • Publish: Save and publish the report. After refresh, the slicer will auto-select the latest month.

 

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Poojara
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS 

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a "Kudos"

Kind Regards,
Poojara - Proud to be a Super User
Data Analyst | MSBI Developer | Power BI Consultant
Consider Subscribing my YouTube for Beginners/Advance Concepts: https://youtube.com/@biconcepts?si=04iw9SYI2HN80HKS

User can Select the past month also when he open the drop down  but when He refreshing the link or open the link in Service , Slicer should Automatically select the Latest month . 

pallavi_r
Super User
Super User

Hi @Abhishek_Singh_ ,

I believe your question is how can we get slicer automatically updated to latest / current month without manually changing it. 

For that we need to add another column - for current month in DAX calendar table. And the column name will be static like Current/Latest. And the latest month will be saved in "Current"

pallavi_r_0-1734597285415.png

Calendar Table DAX

pallavi_r_1-1734598315093.png

Then Default Month / Current Dax query:

pallavi_r_2-1734598355438.png

Sort the Default Month by month number

pallavi_r_3-1734598428019.png

 

You can also refer this thread for detailed exlaination https://community.fabric.microsoft.com/t5/Desktop/How-to-make-slicer-default-showing-latest-month-as...

If this post helps, please accept this as a solution. Appreciate your kudos.

Thanks,

Pallavi

 

Do you implemention  video , I have some similer requirement , I will adjust as per my requirement . 

Hi @Abhishek_Singh_ ,

I don't have implementation video, but this is exactly how I have coded in my implementation.

1. I have a year and month slicer, where I want the slicer to pick latest month and latest year as default.

pallavi_r_1-1734608883776.png

2. I have created calendar dax table with below script

---------

Calendar Date =

ADDCOLUMNS (

CALENDAR (DATE(year(NOW())-2,1,1),Today()),

"MonthNameShort", UPPER(FORMAT ( [Date], "MMM" )),

"Monthnumber", FORMAT ( [Date], "MM" ),

"Quarter", "Q" & FORMAT ( [Date], "Q" ),

"Year", YEAR ( [Date] ),

"DateID", FORMAT ( [Date], "YYYYMMDD" ),

"YearMonth",Format ([Date],"YYYYMM"))
------------------------------------------
3. Then I have created 2 columns in calendar table fo default year and month
pallavi_r_2-1734609049879.png

Month Default

Month - Default =
var currentMonth = UPPER(FORMAT ( NOW(), "MMM" ))
var month = 'Calendar Date'[MonthNameShort]
return if(currentMonth=month,"Current",month)
 
Year Default:
Year - Default =
var currentYear = FORMAT ( NOW(), "YYYY" )
var year = FORMAT('Calendar Date'[Date],"YYYY")
return if(currentYear=year,"Current",year)
4. Then sort the month-default as per month no.
pallavi_r_5-1734609155725.png

 

This is the complete end to end implementation. 

 

If this post helps, please accept this as a solution. Appreciate your kudos.
 

 

Thanks,

Pallavi

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.