cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kalyani Regular Visitor
Regular Visitor

Current month default selection in Slicers, so that it will show all the visuals the current month

Month.JPG

 

I have a slicer like this and I have to set the selection default to the current month, so that all the other visuals will show only the current month data by default.

 

Can you please help me to do this

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

HI @kalyani,

 

If your calendar is based on current date, you can try to use slicer with relative mode to achieve default filter effect.

 

Sample:

Table = ADDCOLUMNS(CALENDAR(DATE(2015,1,1),TODAY()),"Amount",RANDBETWEEN(1,100)) 

10.PNG


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

6 REPLIES 6
Veles Member
Member

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

I don't think there's a way to do this other than selecting the month and republishing each time you need to update it. The slicer will default to whatever you had selected when you published.

 

You can get technical with DAX measures and have measures that only filter results based on the current month by default or by a month selected on a slicer.

 

I don't think it's really what you're trying to achieve but it will kind of fake what you want.

kalyani Regular Visitor
Regular Visitor

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

Hi,

Thanks for your reply.

 

In the Slicer, we have a option to select the current month with the date column. Just trying to do something similar to that using only the Month value.

 

Is that possible with the DAX measures? Can you give some idea on how to do that?

Community Support Team
Community Support Team

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

HI @kalyani,

 

If your calendar is based on current date, you can try to use slicer with relative mode to achieve default filter effect.

 

Sample:

Table = ADDCOLUMNS(CALENDAR(DATE(2015,1,1),TODAY()),"Amount",RANDBETWEEN(1,100)) 

10.PNG


Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

kalyani Regular Visitor
Regular Visitor

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

Hi, thank you for this option. It worked if I switch my date slicer to a relative mode with This.

 

Earlier, i dont have an date column, but just created a date column with 1st date of every month and used this slicer and it worked. 

 

thank you for your suggestions.

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

Hi All,

 

I have same requirment. Can this be done in simpler way like SSRS default value setup?

 

Highlighted
fraserjewing Visitor
Visitor

Re: Current month default selection in Slicers, so that it will show all the visuals the current mon

This is a neat solution I use:

 

I came up with a neat solution for filtering on the 'Current Month'. Make sure that you have an entry in your Custom Date table for the Year Month in the format 'YYYY-MM'. Make sure you use a leading zero for the month part so it's always two digits like '2019-03'.

 

Once that's in place create this column using DAX:

 

Report Month = IF(MONTH(now()) = Month(DB_DIM_Dates[Date]) && YEAR(now()) = YEAR(DB_DIM_Dates[Date]), "Current Month", DB_DIM_Dates[Year-Month])

 

This will set each day for the current month to 'Current Month' and every other date to their respective Year-Month setting. Add this to a slicer, make it list view and sort descending and as 'Current Month' comes last alphanumerical it appears at the top of the list. 'Current Month' can always be your default value with others available to select. This means that when you subscribe it will happily roll over into a new month etc. You can modify this approach for any date range etc you are interested in.

 

Slicer.png

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors