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
SLJN
Regular Visitor

Return certain values in column based on a selected column from another table

Hi, 

 

I'm trying to return certain values in a column based on a selected business unit. 

 

The business units have several products, but its only certain products and their weight that I'm interested of. 

 

Firstly, I have created a measure for each unit and their products and weights. 

 

Production (SOUTH) =
CALCULATE (
    [WEIGHT(KG)],
   KEEPFILTERS(DIM_BU[Buid] = "SOUTH"),
   KEEPFILTERS(DIM_PRODUCT[PRODUCT] IN {"Banana","Apple","Pear"})
)
 
Then I have created a SWITCH
 
Production Switch =
 VAR BU = SELECTEDVALUE((DIM_BU[Buid]])

 Return
    SWITCH(
        True(),
        BU= "SOUTH", [Production (SOUTH)],
...) 
 
In my report I have a slicer for the BU but i also want a slicer that only displays the selected product of the chosen BU, for all BU. 
 
So if I chose BU south in the slicer I only want the selected products for that BU to appear in the products slicer.
 
How do I do this? 
2 REPLIES 2
vicky_
Super User
Super User

If there is a relationship between BU and Products (e.g. they are in the same table or there is a bi-directional relationship between their tables), check to see that visual interactions is enabled between the two slicers. 
https://learn.microsoft.com/en-us/power-bi/create-reports/service-reports-visual-interactions?tabs=p...

Or you can use a BU > Product heirarchy and just hiding the specific BU / products that you aren't interested in.

SLJN
Regular Visitor

Thank you. 

There is a relationship. 

however there's a lot of BU and they all have specific products that I'm interested in. This solution is dependent on me editing, I'm looking for a more scalable solution.

 

I want the user to be able to change BU and only get the products specified for that specific BU in another slicer. 

 

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.