Forum Discussion
Direct Query ALL() and ALLSELECTED() Limitations?
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?
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-Mode/td-p/63734
1 Reply
- AlexisOlsonSuper User
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-Mode/td-p/63734