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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
bialysz
Regular Visitor

Month (numeric) slicer default settings

Hi guys,

 

I have the data model with DimDate table inside and I would like to have a slicer on my report that range will start always from the January current year to month previous to current one (but there should be possible to select current as well as all the other months in the year - even if there is no data for them). So if there currently an April it should show the data from January to March by default. I need to use the numbers of months on the slicer and I have such column created in the Date table - so for Jan is 1, Feb is 2 etc. Below is the slicer and how it should look by default now. Any help is appreciated - I cannot find any suitable solution.

2019-04-18_11-56-31.png

 

5 REPLIES 5
Anonymous
Not applicable

Hi,

 

Create a column as below,

Month Slicer = Orders[Month]<MONTH(TODAY()) which give syou boolean value T/F.
and use this Month slicer as page/visual filter as per your usecase & set it to True.
below is the result,
Month Slicer.PNG
 
let me know if this works for you!
 
Regards
Harsha Vardhan

Thanks, but that is not solving my issue as I need to have a slicer that will display all months on it and to display the data to current month as well.

@bialysz in my original reply I mentioned it is not possible at this point. Check ideas forum and vote if this idea exists otherwise create new idea



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

AnthonyTilley
Solution Sage
Solution Sage

There are two ways i can think off to achive what you stated.

 

1. in the table that contains your date colunm add a calculated colunm for If(table1[date] < NOW() ,TRUE,FALSE)

you can then use this to filter the whole report and your slicer will shrink down to only the defaulted values

 

2. i always use my own date table, rather than use to built in date tables i import my own and connect all relevent dates to this table. i have a colunm in this table for month which can be used and a colunm for date_Passed that does the same check above.

 

i can upload a copy of my date table if you need it 





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

Proud to be a Super User!




parry2k
Super User
Super User

@bialysz afaik, you cannot set default values.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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