cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
miguel_garcia
New Member

Latitude/Longitude Classification/Conditional

Hello, 

 

I´ve been trying to classify a certain latitude/longitude(point) within Power Bi according to an specific area which is not exactly a Shape Maps / Choropletic Standard (Country, state, etc). 

 

The area its an specific one for a special need, I tried with ArcGis "Multiple Select" and its kinda what I need, but it only filters them, and I need to classify them according to that area, something quite like a "Conditional Column" According to that specific area.

 

example.PNG

 

 

Thank you very much for your help!!!!

 

Miguel

 

 

 

 

 
2 ACCEPTED SOLUTIONS

Accepted Solutions
Microsoft v-gizhi-msft
Microsoft

Re: Latitude/Longitude Classification/Conditional

Hi,

 

According to your description, i create a simple sample to test:

111.PNG

Then i define a policy and create a calculated column to show its area:

Area = 
SWITCH (
    TRUE,
    'Table'[Latitude] <= 53.00
        && 'Table'[Latitude] > 52.00
        && 'Table'[Longtitude] <= -99.50
        && 'Table'[Longtitude] > -99.54, "Area1",
    'Table'[Latitude] <= 54.00
        && 'Table'[Latitude] > 53.00
        && 'Table'[Longtitude] <= -99.40
        && 'Table'[Longtitude] > -99.50, "Area2",
    'Table'[Latitude] <= 53.00
        && 'Table'[Latitude] > 52.98
        && 'Table'[Longtitude] <= -99.30
        && 'Table'[Longtitude] > -99.39, "Area3",
    'Table'[Latitude] <= 53.30
        && 'Table'[Latitude] > 53.00
        && 'Table'[Longtitude] <= -99.10
        && 'Table'[Longtitude] > -99.30, "Area4"
)

And it shows:

112.PNG

Add this [Area] column to map visual, the result shows:

113.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

 

View solution in original post

miguel_garcia
New Member

Re: Latitude/Longitude Classification/Conditional

Thank you very much for your help Giotto, I solved it !

 

Miguel

View solution in original post

2 REPLIES 2
Microsoft v-gizhi-msft
Microsoft

Re: Latitude/Longitude Classification/Conditional

Hi,

 

According to your description, i create a simple sample to test:

111.PNG

Then i define a policy and create a calculated column to show its area:

Area = 
SWITCH (
    TRUE,
    'Table'[Latitude] <= 53.00
        && 'Table'[Latitude] > 52.00
        && 'Table'[Longtitude] <= -99.50
        && 'Table'[Longtitude] > -99.54, "Area1",
    'Table'[Latitude] <= 54.00
        && 'Table'[Latitude] > 53.00
        && 'Table'[Longtitude] <= -99.40
        && 'Table'[Longtitude] > -99.50, "Area2",
    'Table'[Latitude] <= 53.00
        && 'Table'[Latitude] > 52.98
        && 'Table'[Longtitude] <= -99.30
        && 'Table'[Longtitude] > -99.39, "Area3",
    'Table'[Latitude] <= 53.30
        && 'Table'[Latitude] > 53.00
        && 'Table'[Longtitude] <= -99.10
        && 'Table'[Longtitude] > -99.30, "Area4"
)

And it shows:

112.PNG

Add this [Area] column to map visual, the result shows:

113.PNG

Hope this helps.

 

Best Regards,

Giotto Zhi

 

View solution in original post

miguel_garcia
New Member

Re: Latitude/Longitude Classification/Conditional

Thank you very much for your help Giotto, I solved it !

 

Miguel

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors