Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi there,
Hope you can help me understand how to change name of the option called "(blank)" in my slicer (and chart) - see picture below.
Here is some background:
Thanks!
GL
Solved! Go to Solution.
Hi @gittelena
I think you build two tables as below, build relationships(Many to one & Single) between Unique ID columns between two tables and build a slicer by On preferred list? column.
Customer Table:
Preferred customers Table:
Relationship:
Due to On preferred column don't have "NO"Values and two tables are related, so the slicer will show blank as "No".
You can achieve your goal by calculated column or measure. And you don't build relationships or add an On preferred column in Preferred customer Table.
Measure:
Build a Yes/No slicer.
M_Customer =
VAR _Select =
SELECTEDVALUE ( Slicer[On Preferred List?] )
VAR _PreferTable =
VALUES ( 'Preferred customers'[Customer] )
VAR _Yes =
CALCULATE (
MAX ( Customer[Customer] ),
FILTER ( Customer, Customer[Customer] IN _PreferTable )
)
VAR _No =
CALCULATE (
MAX ( Customer[Customer] ),
FILTER ( Customer, NOT ( Customer[Customer] IN _PreferTable ) )
)
RETURN
IF (
ISFILTERED ( Slicer[On Preferred List?] ),
IF ( _Select = "Yes", _Yes, _No ),
MAX(Customer[Customer])
)
Result is as below.
Default:
Select Yes/No in Slicer.
Or you don't need to do anything except building a calculated column in Customer table.
On Preferred list? = IF(Customer[Customer]in VALUES('Preferred customers'[Customer]),"Yes","No")
Result is the same as above.
You can download the pbix file from this link: Slicer based on relationships - how to change name of the option called (blank)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gittelena
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Rico Zhou
Hi @gittelena
I think you build two tables as below, build relationships(Many to one & Single) between Unique ID columns between two tables and build a slicer by On preferred list? column.
Customer Table:
Preferred customers Table:
Relationship:
Due to On preferred column don't have "NO"Values and two tables are related, so the slicer will show blank as "No".
You can achieve your goal by calculated column or measure. And you don't build relationships or add an On preferred column in Preferred customer Table.
Measure:
Build a Yes/No slicer.
M_Customer =
VAR _Select =
SELECTEDVALUE ( Slicer[On Preferred List?] )
VAR _PreferTable =
VALUES ( 'Preferred customers'[Customer] )
VAR _Yes =
CALCULATE (
MAX ( Customer[Customer] ),
FILTER ( Customer, Customer[Customer] IN _PreferTable )
)
VAR _No =
CALCULATE (
MAX ( Customer[Customer] ),
FILTER ( Customer, NOT ( Customer[Customer] IN _PreferTable ) )
)
RETURN
IF (
ISFILTERED ( Slicer[On Preferred List?] ),
IF ( _Select = "Yes", _Yes, _No ),
MAX(Customer[Customer])
)
Result is as below.
Default:
Select Yes/No in Slicer.
Or you don't need to do anything except building a calculated column in Customer table.
On Preferred list? = IF(Customer[Customer]in VALUES('Preferred customers'[Customer]),"Yes","No")
Result is the same as above.
You can download the pbix file from this link: Slicer based on relationships - how to change name of the option called (blank)
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@gittelena ,Can you share sample data and sample output in table format?
is this a calculated column then you should change the calculation to return No too.
new column
if(isblank([is no preferred list]),"No","Yes")
As far as I know, you can't change the name of (Blank).
The key here is that you need to categorize all of the customers whether they are on the preferred list or not. One way to do this would be to create a calculated/custom column on your master customer table that returns "Yes" for anyone on the preferred table and "No" otherwise. There are a variety of ways to do this but I'd recommend doing it in the query editor so you don't need to load both tables to your model.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |