Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi.
I have a table with flights, source and destination cities.
In slicer, I have a list of cities.
I need a visual table to list all entries where selected city is either a source or a destination.
If my understanding is right, I cannot do a relationship model but I need to filter the visual based on some DAX logic, right? What would the syntax be? Or is there some easier solution?
Thank you
Solved! Go to Solution.
Hi, @marama
You can create a measure to filter table visual:
Try measure as below:
filter =
VAR a =
IF (
SELECTEDVALUE ( 'Table'[destination] )
IN VALUES ( City[city] )
|| SELECTEDVALUE ( 'Table'[source] ) IN VALUES ( City[city] ),
1,
0
)
RETURN
IF ( ISFILTERED ( City[city] ), a, a )
Then apply it to visual filter pane.
Please let me know if I misunderstood.
Best Regards,
Community Support Team _ Eason
@marama , Youcan join city with both source and destination, one join will inactive that you can activate using userelationship
then measure like below, assume source join is active
count(Table[source ]) + calculate(count(Table[destination]), userelationship (city[city],Table[destination]) )
Thank you, but join turned out to be too slow in my case (I have more then 100K records)
Hi, @marama
You can create a measure to filter table visual:
Try measure as below:
filter =
VAR a =
IF (
SELECTEDVALUE ( 'Table'[destination] )
IN VALUES ( City[city] )
|| SELECTEDVALUE ( 'Table'[source] ) IN VALUES ( City[city] ),
1,
0
)
RETURN
IF ( ISFILTERED ( City[city] ), a, a )
Then apply it to visual filter pane.
Please let me know if I misunderstood.
Best Regards,
Community Support Team _ Eason
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
116 | |
100 | |
69 | |
68 | |
44 |
User | Count |
---|---|
145 | |
106 | |
105 | |
90 | |
65 |