Forum Discussion
Trouble using SELECTEDVALUE in already filtered values.
- 3 years ago
Wow, I would have never though to define variables within an ADDCOLUMN call, thanks.
There is, however one small problem. When I move everything over to my actual data, the calculated table Departure Slicer has over 1000 rows. This is a bit much for the end user to scroll through a slicer to find the airport they want to select.
What I’ve been trying to do since you replied was creating a stand-alone table DepartureSlicer2 in Power Query and then use the columns Continent, Country, and City from the Airport table as slicers to filter the 'Departure Slicer' [AirportCode] slicer down to just the ones that are in the interested area. I have the table relations set this way so that the selection from DepartureSlicer2 does not influence Flight details.That way the list of departure airports in the data table and the departure airports in the slicer where you select the sa variable are the same. As you can guess, this doesn't work. I’ve added the .pbix file so you can see for yourself. Any help or guidance would be great. Sorry I wasn’t more explicit in the previous reply.
What-if Test Project 00.02.pbix
BTW, I appreciate your patience with me.
Are you planning to base the slicer offerings on fact data (existing flights going to that destination) or dimension data (someone deciding which geography to look at?
- AlanRGroskreutz3 years ago
Helper II
Dimension data. Someone deciding which geographical are to look at. I was assuming the user could use the geographical areas in the Airports Table.
- AlanRGroskreutz3 years ago
Helper II
To close the loop on this thread, I was able to create a measure to use a value on the filter pane associated with the slicer that selects the departure airport that has the what-if parameter values assigned.
Departure_Airport_Filter = VAR selectedGroup= values(Airports[AirportCode]) VAR Airports_in_Group_w_flights = values('Flight details'[adep]) RETURN CALCULATE ( VALUES ( 'DepartureSlicer'[AirportCode] ), FILTER ( 'DepartureSlicer', 'DepartureSlicer'[AirportCode] IN selectedGroup && DepartureSlicer[AirportCode] IN Airports_in_Group_w_flights ) )It now limits the parameter selection slicer to the same group of airports as listed in the table.
Thanks for all your help.