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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

Reply
alleckii
Frequent Visitor

Card that only shows up when subcategory is selected

Hi,

 

I am wondering if it is possible to create card visualization that shows up only when subcategory is selected. Or when non of subcategories is selected and then the card shows e.g. "All subcategories".

 

Thanks for help!

Alleckii

1 ACCEPTED SOLUTION
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @alleckii ,

I have tried replicating your scenario with some dummy data.

Below is the data table that I have used

AvantikaThakur_0-1659690950298.png

1) You will be required to create a measure with the below definition first -

Subcategory = IF(ISFILTERED('Sub Category'[Sub Category]),
IF(HASONEVALUE('Sub Category'[Sub Category]),VALUES('Sub Category'[Sub Category]),
CONCATENATEX('Sub Category','Sub Category'[Sub Category],", ")),"All Sub Categories")
 
2) This will reflect the selected category when 1 category is selected in the slicer as below
AvantikaThakur_1-1659691045031.png

3) If we select 2 sub-categories, it will concatenated sub categories in the card visual -

AvantikaThakur_2-1659691111794.png

4) If none if the categories are selected it will give "All Subcategories" in card visual

AvantikaThakur_3-1659691167161.png

 

Hope this helps!

 

Please accept the solution if this answers your query.

 

Thanks,

Avantika

View solution in original post

2 REPLIES 2
Avantika-Thakur
Solution Supplier
Solution Supplier

Hi @alleckii ,

I have tried replicating your scenario with some dummy data.

Below is the data table that I have used

AvantikaThakur_0-1659690950298.png

1) You will be required to create a measure with the below definition first -

Subcategory = IF(ISFILTERED('Sub Category'[Sub Category]),
IF(HASONEVALUE('Sub Category'[Sub Category]),VALUES('Sub Category'[Sub Category]),
CONCATENATEX('Sub Category','Sub Category'[Sub Category],", ")),"All Sub Categories")
 
2) This will reflect the selected category when 1 category is selected in the slicer as below
AvantikaThakur_1-1659691045031.png

3) If we select 2 sub-categories, it will concatenated sub categories in the card visual -

AvantikaThakur_2-1659691111794.png

4) If none if the categories are selected it will give "All Subcategories" in card visual

AvantikaThakur_3-1659691167161.png

 

Hope this helps!

 

Please accept the solution if this answers your query.

 

Thanks,

Avantika

Great! That measure works just as I wanted. Thanks for help @Avantika-Thakur !

 

Alleckii

Helpful resources

Announcements
Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors