Forum Discussion

tobny76's avatar
tobny76
Helper III
1 year ago
Solved

Don't execute query before user select a filter

Hi, How can I avoid the init query in a report? I'm using query reduction in a report and want the user to press the "Apply all slicers" button for the first query to be executed. I know I can a...
  • nilendraFabric's avatar
    1 year ago

    Hello tobny76 

     

    create a measure that checks whether specific slicers have been set.

    Then, apply a visual-level filter on each chart or table so it only shows rows when this measure equals 1.

     

    Power BI may still send an initial lightweight query, none of your main visuals display data unless that measure is triggered, effectively emulating “no data” by default

    Something like this

     

    ShowData =
    VAR IsSlicerFiltered =
    IIF(
    ISFILTERED('Table'[SlicerColumn]),
    1,
    0
    )
    RETURN
    IsSlicerFiltered

     

    Hope this helps 

     

    Thanks