Forum Discussion
How to Create Slicer Using Name and Not ID
- 8 years ago
Consider adding a calculated column to your support ticket table to contain the related customer name like:
Customer Name = RELATED('CustomerTable'[Customer Name])Then use this column in your slicer visual.
Hi mhambalek
Which direction is your relationship in your data?
I would imagine that as long as you are using the Customer Name from your Customer Table in your slicer, then when you click on a Customer Name it should work as expected.
If it does not are you able to provide a sample of your data?
Hi GilbertQ,
The relationship is working. Clicking a customer that exists in the tickets table selects the right data. The problem is the slicer shows ALL customers in the customer table and not just the ones that exist in the tickets table. There are over 4000 customers showing in the slicer. I'd like it to only show the ~80 customers that actually have tickets.
The relationship is many to one, Support Tickets to Customer and single direction.
- GilbertQ8 years agoSuper User
Hi mhambalek
You could then use this blog post I did, in which I demonstrate how to only create a calculated table that has got the values in your data. Which is what I think you are looking for.
https://www.fourmoo.com/2017/01/24/power-bi-how-to-filter-slicers-dynamically/