Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am wanting to create a map visual similar to this;
The Incidents and Crashes values are included in the same column so I have duplicated the primary Query (eventsList) and filtered the values that make up the 'Incidents' and 'Crashes' into separate Queries (eventsLists (Incidents), eventsList (Crashes), respectively).
In the available Map Visual it appears I am only able to add Lat/Long for one dataset (eventsList (Incidents) shown below). How can I add the 2nd dataset to the same Map Visual and assign it a different color?
Solved! Go to Solution.
Hi @Anonymous ,
In the query editor add a new column with the following syntax:
if
[Column1] = "accident"
or [Column1] = "minor accident"
or [Column1] = "multi vehicle accident"
then "Crash" else
if
[Column1] = "stalled vehicle"
or [Column1] = "debris in roadway"
or [Column1] = "incident"
then
"Incident"
else
"NO CATEGORY"
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHow to Get 2nd Latlong/ what is the 2nd Latlong
Thank you for the suggestions...it worked exactly how it was supposed to!
Ok, that makes sense. Since I'm quite new to Power BI, any suggestions as to how I would classify each entry as a 'Crash' if it has originally been assigned an 'accident', 'minor accident', 'multi vehicle accident' or 'Incident' if it has originally been assigned a 'stalled vehicle', 'debris in roadway', or 'incident'? Here is an example of my table;
Hi @Anonymous ,
In the query editor add a new column with the following syntax:
if
[Column1] = "accident"
or [Column1] = "minor accident"
or [Column1] = "multi vehicle accident"
then "Crash" else
if
[Column1] = "stalled vehicle"
or [Column1] = "debris in roadway"
or [Column1] = "incident"
then
"Incident"
else
"NO CATEGORY"
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
You can create a calculated column in your table like so:
Crash or Incident =
SWITCH (
TRUE (),
[Column] IN { "accident", "minor accident", "multi vehicle accident" }, "Crash",
[Column] IN { "stalled vehicle", "debris in roadway", "incident" }
)
Then, you can create a slicer using this column to filter data.
Best regards
Icey
If this post helps, then consider Accepting it as the solution to help other members find it faster.
Hi @Anonymous ,
How did you do the split of the table into two different tables?
Did you filter put any field by some categoruzatipn?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
Has you refer you can only add a single LATITUDE and LONGITUDE believe that since this two table are a from the same table you don't need to split the data into two tables, just use an additional column on your data to categorized the information into crashes and incidents and then use that column on the Legend of the map that way you have more than one spot on the same map:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCheck out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!