Forum Discussion

julsr's avatar
julsr
Icon for Continued Contributor rankContinued Contributor
1 year ago
Solved

D-1 functionality on PBIX with single date picker feature

Hi Everyone! I'm implementing what I commented in this thread, but now I have a problem. I'm using this approach, and it works when I'm not using the feature to have a single date picker as mentioned...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi julsr ,

     

    As long as you don't bookmark a Preselected Slicer, its default selected date is automatically updated every day. If you need the data from other pages to be filtered synchronously, you just need to sync the slicer as I did before.

     

    Also, the buttons in Power BI Desktop do not support filtering data directly. In addition to Preselected Slicer, you can also consider creating calculated tables and measures. But your report has many pages, so it's easier to create measures. Here is the method about measure for your reference:

    check = VAR table1= ALL('dummy-sales-data'[Fecha])
    VAR table2= ALLSELECTED('dummy-sales-data'[Fecha])
    VAR test= IF (
        COUNTROWS ( EXCEPT ( table1, table2 ) ) = 0
        && COUNTROWS ( EXCEPT ( table2, table1 ) ) = 0,
        TRUE,
        FALSE
    )
    RETURN IF(test,IF(MAX('dummy-sales-data'[Fecha])=DATE(2024,1,19),1,2),IF(MAX('dummy-sales-data'[Fecha]) in table2,1,2))

    When I click the "Clear all slicers" button, only set Date rows will be displayed in the table.

    Other things you need to do:

    1. Set filters for other visuals.

    2. Manually adjust the column width or change the column background color to hide the "check".

     

     

     

     

    ———————————————————————————————————————————————————

    Please choose the method that suits you according to your needs. If my answer solves this issue, please accept it as a solution, which will show it to more people who need help.

     

     

    Best regards,

    Mengmeng Li