Forum Discussion
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 add a default dummyfilter and let the user press "Clear all slicers".
But is it a better way of doing this without the need to let the user press "Clear all slicers first".
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
IsSlicerFilteredHope this helps
Thanks
2 Replies
- nilendraFabricSuper User
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
IsSlicerFilteredHope this helps
Thanks
- v-aatheequeCommunity Support
Hi tobny76 ,
If our response addressed by the community member for your query, please mark it as Accept Answer and click Yes if you found it helpful.Should you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!