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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
CW01
New Member

Returning multiple slicer values based off one slicer selection

In power bi I have a table with two columns called AltOrgCode which is a list of codes, and a column called OrgAbbreviated which is a list of organizations, AltOrgCodes only contains distinct values whereby OrgAbbreviated can have the same organizations more than once but with a different AltOrgCode assigned. I need to be able to select one AltOrgCode in a slicer and have it return all AltOrgCodes relating to that OrgAbbreviated value? How do I do this?

 

For example below. If I selected AltOrgCode EGS from my slicer I would need all data in a table to show for EGS, EGSA and EGSB. 

 

CW01_0-1743685664627.png

 

Using the OrgAbbreviated field in the slicer was proposed but the stakeholder specifically wants the AltOrgCode to be the slicer options.

 

Any help would be greatly appreciated! Thank you in advance 🙂 

 

1 ACCEPTED SOLUTION

Hi @CW01 , Thank you for reaching out to the Microsoft Community Forum.

 

Create a mapping table that captures the relationship between AltOrgCodes and OrgAbbreviated. Example:

AltOrgMapping =

SUMMARIZE(

    Sheet1,

    Sheet1[AltOrgCodes],

    Sheet1[OrgAbbreviated]

)

 

Next, create a table disconnected from your data model for the AltOrgCodes. Example:

AltOrgCodeSlicer =

DISTINCT(AltOrgMapping[AltOrgCodes])

 

Then, create a measure to determine whether each row in your data matches the OrgAbbreviated tied to the selected AltOrgCode. Example:

ShowRelatedAltOrgCodes =

VAR SelectedCode = SELECTEDVALUE(AltOrgCodeSlicer[AltOrgCodes])

VAR SelectedOrg =

    CALCULATE(

        MAX(AltOrgMapping[OrgAbbreviated]),

        AltOrgMapping[AltOrgCodes] = SelectedCode

    )

RETURN

    IF(

        MAX(Sheet1[OrgAbbreviated]) = SelectedOrg,

        1,

        0

    )

 

Use the AltOrgCodeSlicer[AltOrgCodes] column in your slicer and apply the ShowRelatedAltOrgCodes measure as a visual-level filter set to 1. This will ensure that when one AltOrgCode is selected, all rows with the same OrgAbbreviated and their corresponding AltOrgCodes are shown.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

6 REPLIES 6
v-hashadapu
Community Support
Community Support

Hi @CW01 ,
I hope the information shared was helpful. If you have any additional questions or would like to explore the topic further, feel free to reach out. If any of the responses resolved your issue, please mark it "Accept as solution" and give it a 'Kudos' to support other members in the community.
Thank you!

v-hashadapu
Community Support
Community Support

Hi @CW01 , Just checking in—were you able to resolve the issue?
If one of the replies helped, please consider marking it as "Accept as Solution" and giving a 'Kudos'. Doing so can assist other community members in finding answers more quickly.
Thank you!

v-hashadapu
Community Support
Community Support

Hi @CW01 ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!

pankajnamekar25
Memorable Member
Memorable Member

Create a new calculated column

 

RelatedAltOrgCodes =

CALCULATE(

    CONCATENATEX(

        FILTER(

            TableName,

            TableName[OrgAbbreviated] =

            CALCULATE(

                VALUES(TableName[OrgAbbreviated]),

                TableName[AltOrgCodes] = SELECTEDVALUE(TableName[AltOrgCodes])

            )

        ),

        TableName[AltOrgCodes],

        ", "

    )

)

 

Thanks,
 Pankaj Namekar | LinkedIn

If this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.

Hi, thank you for your response. However, when I have tried this I receive a circular dependancy error. 

 

"A circular dependency was detected: Sheet1[RelatedAltOrgCodes]."

Hi @CW01 , Thank you for reaching out to the Microsoft Community Forum.

 

Create a mapping table that captures the relationship between AltOrgCodes and OrgAbbreviated. Example:

AltOrgMapping =

SUMMARIZE(

    Sheet1,

    Sheet1[AltOrgCodes],

    Sheet1[OrgAbbreviated]

)

 

Next, create a table disconnected from your data model for the AltOrgCodes. Example:

AltOrgCodeSlicer =

DISTINCT(AltOrgMapping[AltOrgCodes])

 

Then, create a measure to determine whether each row in your data matches the OrgAbbreviated tied to the selected AltOrgCode. Example:

ShowRelatedAltOrgCodes =

VAR SelectedCode = SELECTEDVALUE(AltOrgCodeSlicer[AltOrgCodes])

VAR SelectedOrg =

    CALCULATE(

        MAX(AltOrgMapping[OrgAbbreviated]),

        AltOrgMapping[AltOrgCodes] = SelectedCode

    )

RETURN

    IF(

        MAX(Sheet1[OrgAbbreviated]) = SelectedOrg,

        1,

        0

    )

 

Use the AltOrgCodeSlicer[AltOrgCodes] column in your slicer and apply the ShowRelatedAltOrgCodes measure as a visual-level filter set to 1. This will ensure that when one AltOrgCode is selected, all rows with the same OrgAbbreviated and their corresponding AltOrgCodes are shown.

 

If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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