Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi there,
In a force directed graph, I'm looking to see all interactions related to a node when a slicer is used.
In the below you could see once Atlanta is selected, it shows only ATL - BOS but not BOS - ATL. Is there a way to show all interaction to that node? apologize i could not attach the pbix however i have provide the details below.
DummyData
Source | Destination | Flight |
Atlanta | Boston | Flight1 |
Atlanta | Chicago | Flight2 |
Atlanta | NewYork | Flight3 |
Boston | Atlanta | Flight4 |
Thanks
Solved! Go to Solution.
HI @Anonymous ,
Create a table with all the airports then add the following measure:
Filter Airports =
IF (
VALUES ( 'Table'[Destination] )
IN VALUES ( Airport[Airport] )
|| VALUES ( 'Table'[Source] ) IN VALUES ( Airport[Airport] ),
1
)
Now use this measure to filter out the Force direct and the Airport has your slicer:
Check PBIX file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks Miguel. It works. I have few more scenario.
How do i attach a pbix?
HI @Anonymous ,
Create a table with all the airports then add the following measure:
Filter Airports =
IF (
VALUES ( 'Table'[Destination] )
IN VALUES ( Airport[Airport] )
|| VALUES ( 'Table'[Source] ) IN VALUES ( Airport[Airport] ),
1
)
Now use this measure to filter out the Force direct and the Airport has your slicer:
Check PBIX file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks Miguel. Apologize i cant attach since my org does not allow online drives. So trying my best on the image below. On the same report i have another visual. (i cant use filter airport to the visual. may be its a visual issue?)
Changes made
- Added a new record (phoenix to atlanta record)
- Added phoenix to airport table
- Added State to airport table
- Added Decomposition tree
Hi @Anonymous ,
To what I can you want to show the routes correct?
Try the following add the measure below:
Total Flights = COUNTROWS(filter(ADDCOLUMNS('Table', "FilterAirports", [Filter Airports]), [FilterAirports] <> BLANK()))
Now use this measure on the tree map visualization and the destinations / source on the explanation:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks Miguel. Almost close. But the below is what im trying to get. Any thoughts. I'm not trying to count the flights.
Please dont get carried away by the word "Destination". The intent of the tree is show only connections between airports and what flights. Atlanta connects 4 airports. So when atlanta is selected, tree's first column should only be 4 airports. Next tree column is flights.
Hi @Anonymous ,
Since you want to different interactions and with a single slicer you need to make a second table for the airports and the add the following measure:
Filter Decomposition =
VAR temp_table =
FILTER (
ADDCOLUMNS ( 'Table', "FilterAir", [Filter Airports] ),
[FilterAir] <> BLANK ()
)
VAR airportsselection =
UNION (
FILTER (
SELECTCOLUMNS ( temp_table, "Airport", 'Table'[Source] ),
NOT ( [Airport] IN VALUES ( 'Airport - Slicer'[Airport] ) )
),
FILTER (
SELECTCOLUMNS ( temp_table, "Airport", 'Table'[Destination] ),
NOT ( [Airport] IN VALUES ( 'Airport - Slicer'[Airport] ) )
)
)
RETURN
COUNTROWS (
FILTER (
'Airport - Decomposition Tree',
'Airport - Decomposition Tree'[Airport] IN airportsselection
)
)
Now use the column on the second airport table to be you column on the decompostion tree and filter the decompositon by the previous measures:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português