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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
PaulDBrown
Community Champion
Community Champion

Return values from SLICER from a related table

Hi everyone,

 

I'm hoping for some help with what seems like a simple task. I'm trying to display the values from a related table as selected in a slicer a slicer in a card visual. I'm using CONCATENATEX to account for the instances when more than one item is selected in the slicer. I'm obviously doing something wrong, since the measure I'm using returns all the values; in other words, the measure doesn't work. Here is a graphical representation of the model and the output sought after:

 

 

Related Final.png

 

 

I am expecting the output to be "AAA" if the ITEM slicer has "B" selected.

Can someone point me in the right direction??

 

Thank you!

 

Regards,

 

Paul.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@PaulDBrown

 

Give this a shot

 

Measure =
CALCULATE (
    FIRSTNONBLANK ( Category[Category], 1 ),
    CROSSFILTER ( 'ITEM'[Sub-Category], SubCategory[Sub-Category], BOTH ),
    CROSSFILTER ( SubCategory[Category], Category[Category], BOTH )
)

View solution in original post

3 REPLIES 3
Zubair_Muhammad
Community Champion
Community Champion

@PaulDBrown

 

Give this a shot

 

Measure =
CALCULATE (
    FIRSTNONBLANK ( Category[Category], 1 ),
    CROSSFILTER ( 'ITEM'[Sub-Category], SubCategory[Sub-Category], BOTH ),
    CROSSFILTER ( SubCategory[Category], Category[Category], BOTH )
)

@Zubair_Muhammad

 

I worked it out! I used CONCATENATEX  in your measure (en lieu of the FIRSTNONBLANK ( Category[Category], 1 ) part and apparently it works (returns multiple values according to the selections in the slice)r.

Just for the benefit of those looking for a similar solution, this is the final measure to cater for multiple selections:

 

Value of Category CONCATENATX = 
CALCULATE (
    CONCATENATEX(Category; Category[Category]; ", ");
    CROSSFILTER ( 'ITEM'[Sub-Category]; SubCategory[Sub-Category]; BOTH );
    CROSSFILTER ( SubCategory[Category]; Category[Category]; BOTH )
)

Thanks again Zubair. I struggled with this for hours!

PS: I'm actually intrigued as to how this would be tackled using RELATEDTABLE, if at all possible, since I was under the impression that the functions RELATED and RELATEDTABLE allowed you to reference a table linked via a one-to-many relationship with another.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






@Zubair_MuhammadIt works like a charm! thank you! Is there a way to cater for mutliple selections in the slicer? (that's why I was trying to use CONCATENATEX originally...)

 

 

Thank you again!

Paul.





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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