Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
New2PowerBI
Helper III
Helper III

Obstacle in Creating Saturation in Maps

I would like to create a saturation map where all scheduled work can be displayed (the saturation of color would be based upon the count of the work against any given GPS point), however, the data I have does not contain lat long information. 

 

I do have a "key" I can bring in from another source.  For example, my "key" value is "PS.ICT", and it has the lat long information. 

 

My problem comes with my main data set, my Preventative Work Table, it contains more than just "PS.ICT", it contains names, such as "PS.ICT.MTR.01"...I know that everything with "PS.ICT" is at that location, but how do I get the data to do that?  I think once I figure that piece out I can connect my external "key" with my Preventative Work Table and that should lay the foundation for an easy map build. 

 

Thank you in advance for your help!  🙂 

2 REPLIES 2
Eric_Zhang
Employee
Employee

@New2PowerBI

If the other "keys" are in the same pattern, I mean the leading part before the second dot of the field can be extracted as the key, you can try 

 

let
    Source = Table.FromRows({{"PS.ICT.MTR.01"},{"PS.ICT.MTR.02"},{"PS.ICT.MTR.03"},{"A.BC.XXXXXX"},{"AB.CD.XXXX"},{"ABC.D.XXX"}},{"key"}),
    PositionOf1stDot = Table.AddColumn(Source, "1stDotPos", each Text.PositionOf([key],".",Occurrence.First)),
    PositionOf2ndDot = Table.AddColumn(PositionOf1stDot , "2ndDotPos", each Text.PositionOf(Text.Range([key],[1stDotPos]+1),".",Occurrence.First)+[1stDotPos]),
    actualKey = Table.AddColumn(PositionOf2ndDot,"actualKey", each Text.Range([key],0,[2ndDotPos]+1)) 
in
    actualKey

Capture.PNG

I've not worked with anything like this before; can you provide additional detail on the steps? 

 

Also got me to think, if I just "strip" the values to include only text, first dot, and then text before decond dot, do I even need a "key"...at that point, I can relate the new, stripped values, to the other table I have with GPS units to make that map work.  AM I way off here?  

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors