disconnected tables
2 TopicsReturn Items that have Neither Item Selected
A DAX Puzzler: I have an inventory problem I'm trying to solve. Each location has inventory in a table TableQOHRemoveZeros. If I select the items in the slicer, I want it to return locations that have NEITHER item. E.g. if I select iPhone 12 and iPhone 13 in the Slicer, the only location that should return is Location 114 Plum Lane. DISTINCT(TableQOHRemoveZeros[Device Name Short]) I thought that I could query this table after the items were selected against all of the locations using Except, but I don't think it's possible to query a table created by slicer selection. LocationsWithoutSelectedDevices2 = VAR SelectedLocations= ALLSELECTED(DisDeviceNameShort[Device Name Short]) VAR AllLocations = All('Current Hierarchy'[Sales Code]) Var ExcludeSelectedLocation = EXCEPT(SelectedLocations,AllLocations) Return (ExcludeSelectedLocation) Error:"A table with multiple values was returned when a single value expected" A real doozy. Any way to achieve this? I think it would have huge benefit to others as well and would greatly streamline a process like this. Sales Code Location Device Name Short 111 123 Main St iPhone 12 111 123 Main St Iphone 16 111 123 Main St Iphone 11 112 111 Elm St Iphone 10 112 111 Elm St Iphone 13 112 111 Elm St iPhone 14 114 800 Plum ln iPhone 15 114 800 Plum ln iPhone 16 114 800 Plum ln iPhone 17Solved1.3KViews0likes6CommentsOptimization of Filtered Scenarios with a Disconnected Table
Hello, I have a disconnected table that acts as my slicer/filter. It is intended to interact with a related DIM table/field. This related DIM table/field may not have records for all FACT table records I am calculating measures on. Using ALLSELECTED (instead of SELECTEDVALUE) from the disconnected table is not adequate because results only include FACT records with related DIM table records, excluding FACT records with no associated DIM table records. I want to filter my FACT table if there is a selection, but ignore the disconnected table entirely if nothing is selected. I have a working approach shared below, but the performance is now an issue (I have 10+ metrics using parallel logic). Is there a more optimal way of filtering based on a disconnected table, but only if there is a selection? Bonus points if you can also help proactively address possible '(Blank)' measure results without further hampering performance. Deriving (Blank) as 0 would be fine. Thank you. Joe Disconnected table = selectedViolation FACT table = Data_ACTUAL DIM Table = Violation Detail Shift Hours = VAR selectedViol = SELECTEDVALUE( selectedViolation[Violation Category] ) RETURN IF( ISBLANK( selectedViol ) , CALCULATE( SUM( Data_ACTUAL[Shift Hours] ) ) , CALCULATE( SUM( Data_ACTUAL[Shift Hours] ) , FILTER( 'Violation Detail' , 'Violation Detail'[Violation Category] = selectedViol ) ) )753Views0likes2Comments