Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

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

  • Anonymous's avatar
    Anonymous
    4 years ago

    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

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    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)

     

    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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    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