Forum Discussion

ravichandra0788's avatar
ravichandra0788
Frequent Visitor
8 years ago
Solved

Regarding multiple values display in KPI

Hi ,

 

I have a dataset like below 

 

DEPTNODNAMELOC
10ACCOUNTINGNEW YORK
20RESEARCHDALLAS
30SALESCHICAGO
40OPERATIONSBOSTON

 

Now in powerBI i am using 'chicklet slicer' visual so that it will display selected department name in KPI visual.

 

For this i have created a measure:

 

DepartmentNames = IF(ISFILTERED(dept[DNAME]),CONCATENATE("selected departments are ",VALUES(dept[DNAME])),"No department selected")

 

here is the screen shot.

 

                                                     Help required is : If i select multiple values it is displaying error.Here is the screenshot.

 

                                                      Could you please help me how to resolve this issue.

 

Regards

Ravichandra JL

  • Stachu's avatar
    Stachu
    8 years ago

    I wrote from memory, expression is missing

    DepartmentNames =
    IF (
        ISFILTERED ( dept[DNAME] ),
        "selected departments are "
            & CONCATENATEX ( VALUES ( dept[DNAME] ), dept[DNAME], ", " ),
        "No department selected"
    )

5 Replies

  • Stachu's avatar
    Stachu
    Community Champion

    try this

    DepartmentNames = IF(ISFILTERED(dept[DNAME]),"selected departments are " & CONCATENATEX(VALUES(dept[DNAME]),", "),"No department selected")
    • ravichandra0788's avatar
      ravichandra0788
      Frequent Visitor

      Hi Stachu,

       

      Thanks for the quick response,However suggested solution is not working.

       

      Regards

      Ravichandra JL

       

      • Stachu's avatar
        Stachu
        Community Champion

        I wrote from memory, expression is missing

        DepartmentNames =
        IF (
            ISFILTERED ( dept[DNAME] ),
            "selected departments are "
                & CONCATENATEX ( VALUES ( dept[DNAME] ), dept[DNAME], ", " ),
            "No department selected"
        )
    • ravichandra0788's avatar
      ravichandra0788
      Frequent Visitor

      Hi Stachu,

       

      Thanks for the quick response ,However suggested solution is not working.

       

      Here are screenshots.

       

      Case 1: If no departments selected.

       

                                                                                 Case 2: if one department selected.

       

                                                                                   Case 3 : if multiple departments selected 

       

                                                                                      Request you to help here.

       

      Regards

      Ravichandra JL