I hope you could help me.
I have a dataset with a list of clients with their latitude and longitude.
I have created a map where I can show customers who are at a distance (in kilometers) from a specific point.
What I would like is, to be able to choose a client in a slicer. And then be able to show the clients who are at a chosen distance from him.
The formula for calculating the distance is as follows:
COS ( RADIANS ( 90 - 'clients_test'[lat_origine] ) )
* COS ( RADIANS ( 90 - 'clients_test'[latitude] ) )
+ SIN ( RADIANS ( 90 - 'clients_test'[lat_origine] ) )
* SIN ( RADIANS ( 90 - 'clients_test'[latitude] ) )
* COS ( RADIANS ( 'clients_test'[long_origine] - 'clients_test'[longitude] ))
) * 6371
Currently, I put the latitude and longitude in a column. What I want is that those two data come from a variable or a measure.
I leave you my power bi file HERE
Thank you very much in advance.
You may try SELECTEDVALUE to add a measure.
Hello @v-chuncz-msft ,
Thank you very much for your answer.
Could you explain a little more in detail what you mean, please?
I need to select a client in a slicer. Then, choose a distance to that client and that only the clients that are at the chosen distance of the first client are shown on the map.
How do I have to use the SELECTVALUE formula?
Kudos to you if you earned one of these! Check your inbox for a notification.
Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.
Find out where you can attend!