cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
szenatti Frequent Visitor
Frequent Visitor

Default value in Report Filter Panel

Hi All,

 

I have a requirement to set default values in a Country filter and also set Current Month as default.

 

How can I do it in PowerBI?

 

Thanks,

 

Sergio 

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: Default value in Report Filter Panel

Hi @szenatti,

 

Currently, we are not able to set Report level filter based on current month directly, as DAX is not available in Report Level filter panel. To workaround the issue, we can create a calculated column via expression below:

 

Column = IF(MONTH(Table1[Date])=MONTH(NOW()) && YEAR(Table1[Date])=YEAR(NOW()),"current month","")

 

Then drag this column field to Report Level filter panel, check "current month" as default. You can also drag the Country field to Report Level Filter, then check a prefer value as default.

 

q2.PNG

 

The way is similar to the method in this article: Finding the Latest Date in Power BI Desktop.

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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

4 REPLIES 4
ankitpatira Super Contributor
Super Contributor

Re: Default value in Report Filter Panel

@szenatti if you want filter to be dynamically updated each month then you can't do that for filters but can for slicers. Check out this post on how to do it using slicers.

 

Manual approach will be to set filter for your users and save report. When you share your user will have filter applied saved report. Obviously that means you have to manually change filter each month.

Moderator v-qiuyu-msft
Moderator

Re: Default value in Report Filter Panel

Hi @szenatti,

 

Currently, we are not able to set Report level filter based on current month directly, as DAX is not available in Report Level filter panel. To workaround the issue, we can create a calculated column via expression below:

 

Column = IF(MONTH(Table1[Date])=MONTH(NOW()) && YEAR(Table1[Date])=YEAR(NOW()),"current month","")

 

Then drag this column field to Report Level filter panel, check "current month" as default. You can also drag the Country field to Report Level Filter, then check a prefer value as default.

 

q2.PNG

 

The way is similar to the method in this article: Finding the Latest Date in Power BI Desktop.

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
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

Highlighted
AnandRanga Member
Member

Re: Default value in Report Filter Panel

@v-qiuyu-msft

It works fine, but what if user wants to see the data of previous month ? I mean after publishging  the dashboard how user can remove this filter if It is a page level filter?

ctruong New Member
New Member

Re: Default value in Report Filter Panel

Since this column is a conditional formating, just replace the "else" condition for the month for the date field:

 

Column = IF(MONTH(Table1[Date])=MONTH(NOW()) && YEAR(Table1[Date])=YEAR(NOW()),"current month",MONTH(Table1[Date]))

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Ask Amanda Anything Q&A

Ask Amanda Anything Q&A

Learn the answers to some of the questions asked during the Amanda Triple A event.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Top Kudoed Authors
Users Online
Currently online: 389 members 3,329 guests
Please welcome our newest community members: