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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ferdinando86
New Member

Selecting filter items dynamically

Hi all,
is it possible to select a filter item dynamically? Example: select current month in a months list.

Thanks.
1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @ferdinando86 ,

 

look at this.

 

https://community.powerbi.com/t5/Desktop/Date-Filter-default-to-current-day/m-p/835608/highlight/tru...

 

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

6 REPLIES 6
ferdinando86
New Member

Thanks for the replys.

 

My problem is different. I'd like to automatically "select" current month in filter visual. An example below.

 

Current month:

VisualFilter1.PNG

 

Next month:

VisualFilter2.PNG

 

Is it possible?

 

Best Regards

Ferdinando

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @ferdinando86 ,

 

did you see my reply?

 

I create a column where i renamed the actual month as "Actual Month", to set the default filter on it.

Similar to this..

https://community.powerbi.com/t5/Desktop/Date-Filter-default-to-current-day/m-p/835608/highlight/tru...

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Hi @mwegener ,

 

I did but just now I undestand your solution😊

 

Thanks!

v-alq-msft
Community Support
Community Support

Hi, @ferdinando86 

 

Based on your description, I created data to reproduce your scenario.

Table:

d1.png

 

You may create a measure like below.

 

IsDisplay = 
var _date = SELECTEDVALUE('Table'[Date])
return
IF(
    MONTH(_date)=MONTH(TODAY())&&
    YEAR(_date)=YEAR(TODAY()),
    1,0
)

 

 

Then you need to put the measure in the visual level filter. Here is the result. Today is 4/9/2020. So the result displays the data on 4/1/2020 and 4/2/2020.

d2.png

 

Best Regards

Allan

 

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

 

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @ferdinando86 ,

 

look at this.

 

https://community.powerbi.com/t5/Desktop/Date-Filter-default-to-current-day/m-p/835608/highlight/tru...

 

 

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Greg_Deckler
Community Champion
Community Champion

In Power Query or DAX? In DAX you can use:

MONTH(TODAY())

to get today's month.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

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.