Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I want to visualise on map Stores and it's competitors.
In fact table (dispalyed as visual table) we store information about Store and it's competitor during an event.
When I select in slicer Fair I want to see localisation of Stores and Competitors in map (with different color on map)
I've already did additional table "Map" that combines (UNION) Stores and Competitors with additional column "Type", but I struggle how to make relations. Dimention tables are connced with relation 1:N with fact table.
Any idea how to solve this?
I have factTable
StoreId
CompetitorId
EventId
FairId
And dimension tables
StoreTable
---------
StoreId
StoreName
Longitude
Latitude
CompetitorTable
---------
StoreId
StoreName
Longitude
Latitude
EventTable
---------
EventId
EventName
FairTable
--------
FairId
FairName
Solved! Go to Solution.
@MilczacaOwca I think you need to Unpivot StoreID and CompetitorID in your Fact table.
Then you'll have:
Fact Table:
FairID | EventID | Type | StoreCompID
Your UNION (in Power Query we call it 'append') of Competitor and Store tables is correct - are the IDs unique in these? If not, you'll need to merge columns Type and StoreCompID to get a unique ID in both tables: https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_11.html
Your new UNION table should have:
StoreCompID | Store Name | Lat | Long | Type
where Type is Competitor or Store
Then create a new measure:
[FactTransactions] = COUNTROWS(FactTable)
Put that in the Size of a map visual and put the UNIONdim[Type] in the legend and the UNIONdim Lat and Long in the lat long fields of the map.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@MilczacaOwca I think you need to Unpivot StoreID and CompetitorID in your Fact table.
Then you'll have:
Fact Table:
FairID | EventID | Type | StoreCompID
Your UNION (in Power Query we call it 'append') of Competitor and Store tables is correct - are the IDs unique in these? If not, you'll need to merge columns Type and StoreCompID to get a unique ID in both tables: https://excelwithallison.blogspot.com/2020/08/its-complicated-relationships-in-power_11.html
Your new UNION table should have:
StoreCompID | Store Name | Lat | Long | Type
where Type is Competitor or Store
Then create a new measure:
[FactTransactions] = COUNTROWS(FactTable)
Put that in the Size of a map visual and put the UNIONdim[Type] in the legend and the UNIONdim Lat and Long in the lat long fields of the map.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.