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 all,
I am working with the Map visual in order to show which aircraft routes fly over restricted areas. I am using a colume named TYPE to determing the color of the flight path or the area. This column has values of TRACK, and AREA. These areas use the same columns of LAT, LONG, SEQUENCE, and ID# as the flight paths, but when shown on the map show as polygons rather than lines. There is also a column named RUTA, which details the origin and destination of the flight paths. The cells of this column that are associated to the areas just show the code name of the area. Here is a screenshot of the table for more clatity.
What I want to do, but can't seem to find a way to accomplish it is when filtering for RUTA, to not only show those flight paths that correspond with the selected filter, but to always show the areas. In other words, that the filter would include the selected TRACK rows based upon the value in RUTA, but not filter out the AREA rows.
Solved! Go to Solution.
Hi @AlanRGroskreutz,
You need to use an unconnected table as the source of the slicer then write a measure expression to compare current table records and selections to return tags to achieve custom filter effects.
After these steps, you can use this on 'visual level filter' to filter not-matched records.
Applying a measure filter in Power BI - SQLBI
If you confused about the coding formula, share some dummy data with the raw table structure and expected results to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Hi @AlanRGroskreutz,
You need to use an unconnected table as the source of the slicer then write a measure expression to compare current table records and selections to return tags to achieve custom filter effects.
After these steps, you can use this on 'visual level filter' to filter not-matched records.
Applying a measure filter in Power BI - SQLBI
If you confused about the coding formula, share some dummy data with the raw table structure and expected results to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
OK, I think I responded a bit too soon. The measure I wrote works great when one route is selected, but when more than one is selected I get the error that I am getting more than one vaslue where one was expected.
Here is the measure I wrote:
Route_Filter =
CALCULATE (
VALUES ( 'Mapa Ortos-Trazas-Areas'[ID#] ),
FILTER (
'Mapa Ortos-Trazas-Areas',
'Mapa Ortos-Trazas-Areas'[Ruta] = VALUES ( Ruta[Ruta] )
|| 'Mapa Ortos-Trazas-Areas'[type] = "AREA"
)
)
After fighting with the code of the measure for a few days I got it to work. Thanks.
Thanks, I'll get back to you if I have any questions.
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |