Forum Discussion

kongyuancn's avatar
kongyuancn
Helper II
3 years ago
Solved

context in Tooltip page

Hello all,

I met a context issue in Tooltip page.

Here is my data table

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcjRU0lFyAhHOhkqxOkABI7iAEUTAGF0FWIsRkgojuIAhkhaYilgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t, B = _t, C = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", type text}, {"B", type text}, {"C", type text}})
in
    #"Changed Type"

Which looks like:

And I create a slicer:

A also created a measure:

selected_A = CALCULATE(CONCATENATEX('Table', [A], ","), ALLSELECTED())

which shows all selected in slicer.

Which shows perfect:

Then I created a matrix:

and it looks like:

seems good.

 

Now I created a tooltip page which include this measure:

let matrix use this tooltip page. 

 

 

Now in tooltip it only shows "A2 A2", not "A1,A1,A2,A2". Can any one help to let it show "A1,A1,A2,A2"?

 

 

Thanks in advance.

  • kongyuancn Agree with Arkan_Hazm_ but, it can be done by adding a slicer table and this measure. PBIX is attached below signature.

    selected_A1 = 
        VAR __Category = MAX('Table'[A])
        VAR __Values = DISTINCT('Slicer'[A])
    RETURN
        IF(__Category IN __Values,
            CONCATENATEX(FILTER(ALL('Table'), [A] IN DISTINCT(Slicer[A])),[A], ","),
            BLANK()
        )

3 Replies

  • Arkan_Hazm_'s avatar
    Arkan_Hazm_
    Frequent Visitor

    I think you only see "A2 A2" because u hovering A2 column

    Better to explain what you use this for?

    Is this only for zooming the value ?

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    kongyuancn Agree with Arkan_Hazm_ but, it can be done by adding a slicer table and this measure. PBIX is attached below signature.

    selected_A1 = 
        VAR __Category = MAX('Table'[A])
        VAR __Values = DISTINCT('Slicer'[A])
    RETURN
        IF(__Category IN __Values,
            CONCATENATEX(FILTER(ALL('Table'), [A] IN DISTINCT(Slicer[A])),[A], ","),
            BLANK()
        )