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

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.

Reply
Anonymous
Not applicable

Help please! "No Selection" text from Chiclet Slicer

Hi,

 

I cant figure out how to display in a text box with title = "No Selection" if I dont select any filters from the chiclet slicer:

 

The formula I used is: 

PlanSelection =
VAR _Count = COUNTROWS(VALUES(MICA_Product_Code_Master[Description]))
VAR _Concat = CONCATENATEX(VALUES(MICA_Product_Code_Master[Description]),[Description],", ")
RETURN IF(_Count>3,"Multiple Plan Selection Scorecard",if(_count<3, _Concat & " Scorecard", "No Plan Selected"))
 
The problem is I don't select any values from MICA_Product_Code_Master[Description], the VAR _Count = 50. As such, it displays "Multiple Plans". I want it to become zero ( VAR _Count = 0) so it will appear as "No Selection" and include it in the formula. 
1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for my late reply.

According to my understanding, you want to display

1."No Plan Selected" when there is no selection in Chiclet Slicer;

2. Selections combined by "," and the suffix is "Scorecard" when there are less than or equal 3 selections;

3."Multiple Plan Selection Scorecard" when there are more than 3 selections.

 

If so , you could use ISFILTERED() to check whether a column is being filtered directly :

PlanSelection = 
VAR _Count = COUNTROWS(VALUES(MICA_Product_Code_Master[Description]))
VAR _Concat = CONCATENATEX(VALUES(MICA_Product_Code_Master[Description]),[Description],", ")
RETURN IF(ISFILTERED(MICA_Product_Code_Master[Description]),IF(_Count>3,"Multiple Plan Selection Scorecard",_Concat & " Scorecard"),"No Plan Selected")

Here is the final output:

Eyelyn9_0-1632708244043.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

 

Sorry for my late reply.

According to my understanding, you want to display

1."No Plan Selected" when there is no selection in Chiclet Slicer;

2. Selections combined by "," and the suffix is "Scorecard" when there are less than or equal 3 selections;

3."Multiple Plan Selection Scorecard" when there are more than 3 selections.

 

If so , you could use ISFILTERED() to check whether a column is being filtered directly :

PlanSelection = 
VAR _Count = COUNTROWS(VALUES(MICA_Product_Code_Master[Description]))
VAR _Concat = CONCATENATEX(VALUES(MICA_Product_Code_Master[Description]),[Description],", ")
RETURN IF(ISFILTERED(MICA_Product_Code_Master[Description]),IF(_Count>3,"Multiple Plan Selection Scorecard",_Concat & " Scorecard"),"No Plan Selected")

Here is the final output:

Eyelyn9_0-1632708244043.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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