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
RawandShora
New Member

Make the current month as default value

Greetings, I want to make the current month is a default value for the (date) column.

 

note that I want to make this for different 3 tables, so I tried to make a relation between them on the (date) column and put a filter on one of them, but it doesn't work 😕 

 

Any Solutions, please? 

 

 

Regards

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @RawandShora,

Unfortablely, current power bi does not support setting default value on the slicer.

For your scenario, I'd like to suggest you create a calendar table to link your table date fields. Then you can add a calculated column with if statement to check date value and return tag.  After these steps, you can use this tag to choose current month and save to bookmark to quick reset slicer to the 'default value' current month.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
mussaenda
Super User
Super User

Hi @RawandShora ,

 

You can achieve this by using hasonvalue and filter where you will compare your max month to the moth of today

 

Hope this helps. Thanks

amitchandak
Super User
Super User

@RawandShora , You have to create a date table and join it with all three tables on date.

Then you need to have month year and this column in date column

 

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

Month Type = Switch( True(),
Date([Date]) = eomonth(Today(),-1),"Last Month" , //Last Month
Date([Date])= eomonth(Today(),0),"This Month" , //This Month
[Month Year]
)

 

Sort both month year and month type on month year sort. Take slicer on Month Type, select current month and save

https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column

Dafault Date/Month

https://www.youtube.com/watch?v=hfn05preQYA

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.