Forum Discussion

MURTAZA's avatar
MURTAZA
Icon for Resolver I rankResolver I
5 years ago
Solved

CONCATENATE DISTINCT VALUES in Tooltip

Hi All,

I am trying to create a custom tooltip for a table and matrix visual.
My table is like this. 

DepartmentEmployeePercentage
Dept-AEmp-150%
Dept-AEmp-2100%
Dept-AEmp-3100%
Dept-AEmp-4100%
Dept-BEmp-5100%
Dept-BEmp-6100%
Dept-BEmp-150%
Dept-BEmp-7100%
Dept-BEmp-8100%
Dept-BEmp-9100%
Dept-BEmp-10100%


I want to create a measure for the tooltip to display distinct values of percentages, separated by a ",". So it should show "Percentage = 50%,50%", when I hover over the first row and in the second row "Percentage = 100%".
I wrote this DAX but it didn't work:

Percentage Tooltip =
CALCULATE(
CONCATENATEX(
DISTINCT(Percentage)
,","
),
FILTER(ALL(Table),'Table'[Employee] = SELECTEDVALUE('Table'[Employee])
)
)

 

  • MURTAZA , both values are .5 

     

    You can try like 

    Tooltip = 
    CALCULATE(
    CONCATENATEX(
            SUMMARIZE(Sheet1,Sheet1[Employee],
            Sheet1[Percentage]),[Percentage]
            ),
            ALLEXCEPT(Sheet1,Sheet1[Employee])
            )

     

4 Replies