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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors