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

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.

Reply
Anonymous
Not applicable

Dynamix value based on a slicer result

Hi  Very new to Power BI so please excuse me if the terminology is incorrect!

I want to compare to locations' results based on various measures.  i have set up location 1 and location 2 measures based on two slicers. i can see all the data correctly but the headers dont show the location names, just location 1 and loaction 2

 

example

Net Sales Location 1 =
CALCULATE(
    [Sold Amount],
    FILTER(
        Locations,  
        Locations[LocationName] in {SELECTEDVALUE('First Location'[LocationName])}
        )
 
Net Sales Location 2 =
CALCULATE(
    [Sold Amount],
    FILTER(
        Locations,  
        Locations[LocationName] in {SELECTEDVALUE('SecondLocation'[LocationName])}
        )
  
How do i return the location name (e.g. London or Birmingham) based on the slicer selection rather than the default wording location 1 or Location 2?
 
Thanks
 
GordyMac
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Dynamic measure names are unavailable.

Since you really need two seperate slicers, you could create two seperate tables for the two slicers' fields.

My sample data.

vstephenmsft_6-1673923128838.png

 

1.Create two calculated tables.Using calculated tables in Power BI Desktop - Power BI | Microsoft Learn

vstephenmsft_7-1673923144914.png

vstephenmsft_8-1673923151444.png

There's no relationship between three tabls.

vstephenmsft_9-1673923162170.png

2.Create two measures for the selection of both slicers.

vstephenmsft_10-1673923207774.png

vstephenmsft_11-1673923214279.png

Here's the result.

vstephenmsft_12-1673923354251.png

You can also calculate the difference.

vstephenmsft_13-1673923480388.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

If you don't insist on two slicers to filter two LocationNames, try multi-selecting in one slicer. Hold down Ctrl and click the mouse to multi-select.

This way you don't have to create a separate LocationName table, you can use LocationName directly from your main table(Locations table).

vstephenmsft_0-1673512248218.png

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Anonymous
Not applicable

Thanks Stephen for reply.  I do need two location tables as this slicer goes across multiple visualisations on sevreal pages.  Using your method i could never find a way to calculate a difference, is that possible?

So on your image location A - Location B would equal 100 or 50%

 

Anonymous
Not applicable

Hi @Anonymous ,

 

Dynamic measure names are unavailable.

Since you really need two seperate slicers, you could create two seperate tables for the two slicers' fields.

My sample data.

vstephenmsft_6-1673923128838.png

 

1.Create two calculated tables.Using calculated tables in Power BI Desktop - Power BI | Microsoft Learn

vstephenmsft_7-1673923144914.png

vstephenmsft_8-1673923151444.png

There's no relationship between three tabls.

vstephenmsft_9-1673923162170.png

2.Create two measures for the selection of both slicers.

vstephenmsft_10-1673923207774.png

vstephenmsft_11-1673923214279.png

Here's the result.

vstephenmsft_12-1673923354251.png

You can also calculate the difference.

vstephenmsft_13-1673923480388.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

thanks for responding.  I looked at the video thanks and i have similar results.  Where my headers come back with Location 1 and Location 2 his are showing Net Brand 2 and Net Brand 3.  What i'm hoping to find a solution for is changing this description to which location (or brand in the video example) has been selected in the slicer.

 

GordyMac_0-1673285497941.png

So in the example video i would want the headers to say Brand 4 and Brand 5

 

thanks

 

Gordon

 

amitchandak
Super User
Super User

@Anonymous , You need to use independent table

 

Compare Categorical Data Using Slicers - Compare two Brands: https://youtu.be/exN4nTewgbc

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.