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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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