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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
avilovi
Frequent Visitor

Spain provinces from zipcode

Hello,

 

I'm struggling to create filled map with sales by departments in different countries.

In both France and Spain the first two digits of the postal code denote the corresponding department.

So, I created the column
Department = LEFT(Customers[ZIPCODE],2)
I create a filled map visual and put [Department] in the "Location", [Sales] in the tooltip and it works ... for France, but not for Spain.

avilovi_0-1695975682182.png

Spanish departments are projected to the french ones.

So, the sales in the spanish department 19 (Guadalajara) are shown in the french department 19 (Corrèze).

Putting a slicer on the [Country] helps only in a sense that it removes spanish sales from the map of France when "France" is selected.

When "Spain" is selected in the slicer, it just projects spanish sales on the map of France.

avilovi_1-1695976600577.png

 

I'd ve very grateful for any suggestion how to solve this problem.

 

Here is a small data sample:

'Customers' table:

ACCOUNTNUMCITYZIPCODECountryDepartment
401000FUENTERROBLES46314ESP46
402644BARCELONA08038ESP08
402645Constanti43120ESP43
403006BARCELONA08038ESP08
400999REQUENA46340ESP46
401001BENIFARAIG46016ESP46
402683BARCELONA08041ESP08

 

'Sales' table:

Current salesORDERACCOUNTYear invoiced
1834026442023
2114026442023
5924026442023
7084026452022
6444026452023
4834026452023
9664026452023
2004030062023
1134030062023
504030062023

There is 'one-to-many' relationship between 'Customers'[ACCOUNTNUM] and 'Sales'[ORDERACCOUNT].

1 REPLY 1
HotChilli
Super User
Super User

Data sample please

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.