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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Margreet
Helper I
Helper I

in Title of the visualisation selected items

Hello,

 

Hope someone can help me. I have a slicer of products (for example 10 products)

Now I want in title (fx) of the visualisation see all the selected items from the slicer and when you don't select a product in the slicer than the text "all product".

 

I tried the measure

Title_Product = "Product : "& if(hasonevalue(‘Product[Productcode]),selectedvalue(' Product[Productcode]), concatenatex('Product,'Product[Productcode],","))

 

When notihing is selected I got the names of the 10 products... I want then tot see "all products"

 

Thanks for reaction!

 

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

try this:

Title_Product = 
IF(
    COUNTROWS(VALUES(Product[Productcode])<10,
    "Product : "& if(
        hasonevalue(‘Product[Productcode]),
        selectedvalue(' Product[Productcode]), 
        concatenatex('Product,'Product[Productcode],",")
    ),
"All Products"
)

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

try this:

Title_Product = 
IF(
    COUNTROWS(VALUES(Product[Productcode])<10,
    "Product : "& if(
        hasonevalue(‘Product[Productcode]),
        selectedvalue(' Product[Productcode]), 
        concatenatex('Product,'Product[Productcode],",")
    ),
"All Products"
)
johnt75
Super User
Super User

Try

Title text =
VAR NumSelectedProducts =
    COUNTROWS ( ALLSELECTED ( 'Product' ) )
VAR NumAllProducts =
    COUNTROWS ( ALL ( 'Product' ) )
VAR Result =
    IF (
        NumSelectedProducts = NumAllProducts,
        "All products",
        CONCATENATEX ( 'Product', 'Product'[Product code], ", " )
    )
RETURN
    Result

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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