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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
SD97
New Member

how to set the current month to be shown automatically

Hey, I need to set the current month to be displayed automatically, so far I had to change the display of a specific month in the filter every month after loading the data. I would like powerbi to use the current month itself (data refreshed weekly), I will add that the data includes forecast.

SD97_0-1683630239675.png

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @SD97 ,

I created some data:

vyangliumsft_0-1683789916153.png

 

Here are the steps you can follow:

1. We can click "Get more visual" to add the "Preselected Slicer".

vyangliumsft_1-1683789916154.png

vyangliumsft_2-1683789937380.png

2. We need to create a table like this.

vyangliumsft_3-1683789937380.png

3. Then we can create a measure .

Measure =
var _slicer_date = SELECTEDVALUE('Table'[Column])
var _today=TODAY()
var _month=
MAXX(
   FILTER(ALL('Table'),'Table'[Date]=_today),[Column])
return
IF(
    _slicer_date = _month,TRUE(),FALSE() )

 4. Then we put theses fields on the visual and we can meet your need:

vyangliumsft_4-1683789985835.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @SD97 ,

I created some data:

vyangliumsft_0-1683789916153.png

 

Here are the steps you can follow:

1. We can click "Get more visual" to add the "Preselected Slicer".

vyangliumsft_1-1683789916154.png

vyangliumsft_2-1683789937380.png

2. We need to create a table like this.

vyangliumsft_3-1683789937380.png

3. Then we can create a measure .

Measure =
var _slicer_date = SELECTEDVALUE('Table'[Column])
var _today=TODAY()
var _month=
MAXX(
   FILTER(ALL('Table'),'Table'[Date]=_today),[Column])
return
IF(
    _slicer_date = _month,TRUE(),FALSE() )

 4. Then we put theses fields on the visual and we can meet your need:

vyangliumsft_4-1683789985835.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Looks good but unfortunetly PowerBi shows that: Coulm Date in table Table cannot be found or may not be used in this expression

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.