Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello,
My DAX formulas containing ALL() and ALLSELECTED() do not seem to be working as advertised within the context of a Direct Query Connection.
Query TimeFrame Seconds =
VAR Start_time =
CALCULATE(
MIN(Detections[DetectionDateTime])
,ALL(Detections)
)
VAR End_time =
CALCULATE(
MAX(Detections[DetectionDateTime])
,ALL(Detections)
)
RETURN DATEDIFF( Start_time, End_time, SECOND )
A similar query using the ALL() function in this same context. but using an import data method (pointing to existing dataset in PBI Service) , is working as expected. When I choose a specific device within a slicer viz on the report page canvas, The card viz displaying number of seconds between the min and max timestamp for all devices, does not change when 1 device is selected, which is what I am going for.
Is this possible using Direct Query? Is there another way I can produce static time ranges using my min and max calculations?
Solved! Go to Solution.
When using Direct Query, filtering is based on your slicers even if you use ALL. This function (and related ones) do still work to remove the filter context within a visual.
See this related thread:
https://community.powerbi.com/t5/Desktop/All-Function-Ignored-When-Using-Power-BI-in-Direct-Query-Mo...
When using Direct Query, filtering is based on your slicers even if you use ALL. This function (and related ones) do still work to remove the filter context within a visual.
See this related thread:
https://community.powerbi.com/t5/Desktop/All-Function-Ignored-When-Using-Power-BI-in-Direct-Query-Mo...