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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Mapping Stores

Hi, I have a file that has store site information that I want to map. I have an issue with how to display these in a map for the following reason.

 

Every store site is a "Test Site" AND that Test Site can also be what is called a "Control Site" that gets compared to a "Test Site"

 

Think of this as a store site (the Test Site) and it's surrounding competitive stores (The Control Sites) around that Test store site.

 

A store site can appear in the Control Store Site column for more than one Test Store Site.

 

Any ideas on how to display this from a map perspective? I do have Lat/Long for each site number is another file. What I want is the ability to select a Test Site and see all the Control Sites for that Test Site with a different coloring for all the Control Sites. I don''t want different colors for each Control Sites. But rather all Test Sites should be 1 color and all Control Sites be another color.

 

Any ideas?

 

Here is my file: 

 

Test SiteControl SiteTest ClusterControl Cluster
2700039270915422
2700039270196823
2700039270084322
2700039270024323
2700039270082223
2700039270859925
2700039270285826
2700039270075525
2700039270337825
2700039270294721
2700039270001425
2700039270160623
2701149270119861
2701149270072062
2701149270375164
2701149270167166
2701149270289362
2701149270183262
2701149270345965
2701149270194662
2701149270162064
2701149270198562
2701149270540166
2701149270342462
2708746270336724
2708746270339522
2708746270190824
2708746274162122
2708746274163122
2708746270156626
2708746270175026
2708746270375326
2708746270347321
2708746270664222
2708746270919122
2708746270163322
2700990270915512
2700990270916512
2700990270128611
2700990270194811
2700990270518711
2700990270885312
2700990274171212
2700990270135611
2700990270131011
2700990270344313
2700990270136515
2700990270664314
2706654270195764
2706654274162662
2706654270163562
2706654270576666
2706654270341964
2706654270339464
2706654270636264
2706654270285466
2706654270175462
2706654270855564
2706654270341564
2706654270918264
2703743270664756
2703743270348756
2703743270374654
2703743270080952
2703743274166952
2703743270666152
2703743270073351
2703743270859354
2703743270180053
2703743270855356
2703743270131756
2703743270349551
2741665274164142
2741665270918944
2741665274163944
2741665270595444
2741665270344442
2741665270877844
2741665274170742
2741665270076141
2741665270161344
2741665270155742
2741665270874742
2741665270860044
2 ACCEPTED SOLUTIONS

@Anonymous I fixed it like this:

Promo1 = 
ADDCOLUMNS(
    UNION(
        SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])),
        'Promo'
    ),
    "Legend",IF([Test Site] = [Control Site],"Test","Control")
)

 

Updated PBIX is attached below sig.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

@Anonymous Technically it is not. The problem is that the numbers are very close to one another so Power BI is color coding them nearly the same. This is the problem I was referring to. Try this:

Promo2 = ADDCOLUMNS( UNION( SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])), 'Promo' ), "Legend",IF([Test Site] = [Control Site],2^[Test Cluster],2^[Control Cluster]) )

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

21 REPLIES 21
Greg_Deckler
Community Champion
Community Champion

@Anonymous So that I understand this, for the first row, you want to see all of the other rows (stores) that have a Control Cluster of 2?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler yes and then for every unique store within the Test Site column.

 

I was thinking maybe a slicer for Test Site but then that seems like I restrict the overall map a little too much?

@Anonymous I would use a disconnected table for your slicer and then create a Complex Selector to use in the Filter pane for your map. The Complex Selector - Microsoft Power BI Community



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler I just realized that what I said about a Test Site can be a Control Site is not true! All Test Sites do not show up as Control Sites and No Control Sites show up as a Test site.

 

Does this make a solution easier? I am still trying to figure this out.

@Anonymous Don't need the disconnected slicer then or the Complex selector. You could create a measure like HASONEVALUE('Table'[Control Site]),1,0) and use that for a color?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

 

I am still having a hard time simply trying to filter to a test site and just see that test site and the control sites that compete with that test site. Something as simple as this is perplexing me. Can I upload my .pbix?

@Anonymous Sure.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks @Greg_Deckler

 

 Click Here 

@Anonymous I fixed it like this:

Promo1 = 
ADDCOLUMNS(
    UNION(
        SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])),
        'Promo'
    ),
    "Legend",IF([Test Site] = [Control Site],"Test","Control")
)

 

Updated PBIX is attached below sig.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler How can I now make this legend be able to do color coding like you have already done for me based on Test Site or Control Site (Red & Blue) and introduce Selecting multiple Test Clusters like Cluster 1 and 2. This would then hopefully be able to show 4 different colors?

@Anonymous Hmm. Well, Color in ArcGIS can be a measure. So I suppose you in theory do something. I think the problem you will run into is around figuring out the right context. Also, need to get enough color variation. It would be very tricky.  Maybe:

Measure = 
    VAR __TestStore = MAX('Promo1'[Test Site])
    VAR __ControlStore = MAX('Promo1'[Control Site])
RETURN
    IF(ISBLANK(__TestStore),BLANK(),IF(__TestStore = __ControlStore,__TestStore,__TestStore-2700000))

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler How about if we take the original solution you provided below and make a new Column for Test/Control Cluster for color coding? How would I modify this?

 

Promo1 =
ADDCOLUMNS(
UNION(
SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])),
'Promo'
),
"Legend",IF([Test Site] = [Control Site],"Test","Control")

@Anonymous You would modify the part after "Legend". IDK, the issue is getting a different enough color for each thing you want. If the values are similar, Power BI picks similar colors. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

What I was asking was to instead do the color coding on the Site's like you provided me in the original code, change it to Cluster.

 

Here is your code for Site coloring:

 

Promo1 =
ADDCOLUMNS(
UNION(
SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])),
'Promo'
),
"Legend",IF([Test Site] = [Control Site],"Test","Control")

 

When I try to create a new Promo2 table with the following:

Promo2 =
ADDCOLUMNS(
UNION(
SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])),
'Promo'
),
"Legend",IF([Test Cluster] = [Control Cluster],"Test","Control")
)
 
It has the same color coding of 2 colors as for site. I was expecting different colors for each different cluster # from 1 to 6?

@Anonymous Try:

Promo2 =
ADDCOLUMNS(
UNION(
SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])),
'Promo'
),
"Legend",IF([Test Site] = [Control Site],[Test Cluster],[Control Cluster])
)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler 

That gives me all 1 color for everything. Here is updated .pbix

 

Click Here 

@Anonymous Technically it is not. The problem is that the numbers are very close to one another so Power BI is color coding them nearly the same. This is the problem I was referring to. Try this:

Promo2 = ADDCOLUMNS( UNION( SUMMARIZE('Promo',[Test Site],"Control Site",[Test Site],"Test Cluster",MAX('Promo'[Test Cluster]),"Control Cluster",MAX('Promo'[Control Cluster])), 'Promo' ), "Legend",IF([Test Site] = [Control Site],2^[Test Cluster],2^[Control Cluster]) )

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler Okay, I see that now with this new one and the purplish colors. I guess I am going to have to go back to the drawing board on this to see how best to visualize it. Thank you!

Anonymous
Not applicable

Hi @Greg_Deckler 

 

I will work with this.....but it doesn't need to be ARGIS map. I can use any of the mapping options.

Anonymous
Not applicable

If you need any help with ArcGIS, drop a line and myself or one of the developer will help out.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors