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
Ofri
Regular Visitor

using a live connection with analysis services to fill maps

I have an analysis database (multidimensional) with stores and their sales values. The store dimension has the attributes "store", "longitude" and "latitude". In the calculations of the cube I added two measures for the coordinates:

[Measures].[Longitude] as CDbl( [Store].[Store].Properties("Longitude"))

[Measures].[Latitude] as CDbl( [Store].[Store].Properties("Latitude"))

 

The MDX

 

select { [Measures].[Longitude], [Measures].[Latitude], [Measures].[Sales Value] } on 0
,[Store].[Store].[Store] on 1
from [Sales]

 

returns the correct values and types (alle measures are of type double).

 

How do I visualize the stores on a map in PowerBI-Desktop? How do I configure the properties of a map correctly?

 

Thanks for help!

9 REPLIES 9
ashishogr
New Member

Any solution to the issue in this thread?? I am facing a similar problem.

v-huizhn-msft
Employee
Employee

Hi @Ofri,

Based on your title, you connect SQL Server Analysis database in live connection mode. As I tested, we can't write MDX(the mdx zone is grey out) when get data in live mode as the following screenshot shows.

1.PNG

If you use the MDX to select data, you will get a table including the following fields.

StoreName Longitude Latitude SalesValues
       


If my understanding is right, please put StoreName in Location field, Longitude as Longitude, Latitude as Latitude, SalesValue as Size level.
2.PNG
Then you will get a similar map like the following screenshot shows. The SalesValue is bigger, the size of dots are bigger.

3.png
Best Regards,
Angelia

Hi Angelia

I thougt it would work this way. But you can't drop measures into Latitude or Longitude. Is there an example with live data?

Best wishes, Olaf

Hi @Ofri,

As I tested, when we connect data in live mode. We still can't use measure into into Latitude or Longitude. You need to use  into Latitude or Longitude value in the levels.

Best Regards,
Angelia

Hi Angelia

 

My last post wasn't correct. It is possible to drop measures into Latitude or Longitude, but you get an error message. I tried with

Map:

1.PNG

ArcGIS:

2.PNG

 

Filled Map:

3.PNG

 

I don't see how it would work with "levels". I have dimension properties Latitude and Longitude in level "Store", but I can't use them except as measures. Is there no sample with latitude and longitude?

 

Thanks for help!

Olaf

Hi @Ofri,

The measure will return one value based on the column field. While in Latitude or Longitude, we need corresponding two columns. Because the pair of columns will determine many points rather than one dot. So it displays the error message.

The data structure like what shown in the following screenshot. And you can get it in google map.

1.PNG3.png

Best Regards,
Angelia

I try to send you a sample.

Hi @Ofri,

Got it.

Best Regards,
Angelia

Hi Angelia

You can download a sample from http://ofries.de/powerbi/map.zip. Hope you can see the problem.

Best wishes,

Olaf

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.