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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
robertvdleeuw
Frequent Visitor

Merge 2 selectedvalues from different tables

I have a dataset containing sales of different stores, and am creating a report in which 2 stores can be selected and compared. 

robertvdleeuw_0-1664800189227.png

 

The 'Current' and 'Comparative' slicers at the top left operate on 2 copies of the datatable containing all of the addresses, with no relations to any other tables. This way they don't interfere with one another.

What I want to do is to get both addresses showing in the map at the bottom left. I can get it to display one at a time easily, using the related zip code. But getting them both to show up has been quite a hassle so far, especially because merging the selectedvalues is harder due to the lack of relation between the tables. 

Is there a way to set up a measure containing both addresses, coming from these 2 selectedvalues?

4 REPLIES 4
tamerj1
Super User
Super User

Hi @robertvdleeuw 

To be honest I've never used the map visual therefore not sure how does it behave. I will assume it behaves the same way as a table. 
Create a table that contains all the locations and use it to build the map. 
create a filter measure following this template:

 

=
CALCULATE (
    COUNTROWS ( Location),
    TREATAS (
        {
            SELECTEDVALUE ( Current[Current] ),
            SELECTEDVALUE ( Comparative[Comparative] )
        },
        Location[Location]
    )
)

 

place this measure in the filter pane of map, select "is not blank" and apply the filter. 

 

Hey, thanks for the response.

I filled in your measure with the revelant data, but unfortunately it doesn't seem to work. The 'Selections =/= blank' filter doesn't remove any of the other addresses - or any at all, for that matter. It does 'notice' the 2 selections, but I'm not sure if it actually contains those selections, based on this table:

robertvdleeuw_0-1664809692323.png

 

Hi @robertvdleeuw 
I did some trials. This should work

=
CALCULATE (
    SELECTEDVALUE ( Location[Location] ),
    TREATAS (
        {
            SELECTEDVALUE ( Current[Current] ),
            SELECTEDVALUE ( Comparative[Comparative] )
        },
        Location[Location]
    )
)

Please place this measure in the filter pane and select "is not blank" and apply the measure

 

Hey, thanks again for the help. I tried your new solution, but now 'Selections' is blank.

robertvdleeuw_0-1664902069640.png

 

Here are the important tables regarding this question, if that helps:

robertvdleeuw_1-1664902182804.png

Stores

robertvdleeuw_2-1664902199227.png

Current/Comparative (They're identical)

robertvdleeuw_3-1664902240657.png


If you need anything else, just let me know.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.