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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Dax generated DATE table with a WORKING DAY flag and a Bank Holiday Table

 

Power BI Dax Question - We have a Dax generated DATE table with a WORKING DAY flag and a Bank Holiday Table - which is linked as a related table. The Date is shown as a drop-down with the last 31 relative days (excluding today) filter and Working Day flag = true filter on - so we just see the working, non-BH days in the drop-down. I want to be able to default the date value to the last date in that list...i.e. the working day before today - what's the best way to achieve that? I could probably do this in a SQL view and transform this as a table but I thought there must be a DAX solution to a common thing

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Best Regards,
Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

To my knowledge, there is no option to set custom default selection in slicer.

You could create a flag measure to filter other visuals instead of slicer like:

Flag Measure = IF(MAX('Table'[Date])= MAXX(FILTER(ALLSELECTED('Table'),[Date]<TODAY() && [Working Day]=TRUE()),[Date]),1,0)

Eyelyn9_0-1644221388848.png

 

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

BA_Pete
Super User
Super User

Hi @Anonymous ,

 

This question gets asked A LOT!

It's not a built-in function, but plenty of people have hacked workarounds in different ways.

 

Try some of the suggestions on this thread to see if any suit your needs:

https://community.powerbi.com/t5/Desktop/default-date-on-slicer/m-p/933840 

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors