Forum Discussion

Vasily_Zaytsev's avatar
5 years ago
Solved

Filter value in same table after column value selection

Hello.

I have one table in model with several visual elements (one table, two column charts and two donut charts):

In visual table this data:

tp_Title : dt

user1 : 08.07.2021

user2 : 08.07.2021

user3 : 08.07.2021

I need click on user1 value in visual table for selecting this user in all other four elements and filter this value in this visual table

 

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    5 years ago

    Hi, Vasily_Zaytsev ;

    In my second solution, If you click user 1 in the visual table, the other four visuals have been filtered by user1.such as :

    however,you mentioned that only this user in table after click on it,This is impossible, because interaction refers to other visual objects. Clicking on itself cannot make itself only display user1, so you can copy a same table again, and it will only filter user1.

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Vasily_Zaytsev 

    I'm sorry to understand error, and you could change the two measures as follows:

    count = IF(DISTINCTCOUNT('newtable'[tp_Title])>=2,0,CALCULATE(COUNT([ResourceUID]),FILTER(PSUserInfo,[tp_Title]=MAX('newtable'[tp_Title]))))
    discount = IF(DISTINCTCOUNT('newtable'[tp_Title])>1,1,CALCULATE(DISTINCTCOUNT([ResourceUID]),FILTER(PSUserInfo,[tp_Title]=MAX('newtable'[tp_Title]))))

    The final output is shown below:

    Since the pie chart is not displayed when it is 0, I think it is better to replace Header1 with a slicer in your own pbix.

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Vasily_Zaytsev's avatar
      Vasily_Zaytsev
      Helper I

      Hello, Yalan Wu.

      In your second solution there are several values after selection (7 users). I need only one. If I click on user 1 in visual table I need filter all table by this value only (only this user in table after click on it). 

      • v-yalanwu-msft's avatar
        v-yalanwu-msft
        Community Support

        Hi, Vasily_Zaytsev ;

        In my second solution, If you click user 1 in the visual table, the other four visuals have been filtered by user1.such as :

        however,you mentioned that only this user in table after click on it,This is impossible, because interaction refers to other visual objects. Clicking on itself cannot make itself only display user1, so you can copy a same table again, and it will only filter user1.

        Best Regards,
        Community Support Team_ Yalan Wu
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi, Vasily_Zaytsev ;

    According to your description, you could create a new table as filter value, then create measures as follows:

    1.create a new table.

    newtable = SUMMARIZE('PSUserInfo',[tp_Title],PSUserInfo[dt])

    2.replace filter visual .

    3.create measures(count and distincount)

    count = IF(DISTINCTCOUNT('newtable'[tp_Title])>1,COUNT([ResourceUID]),CALCULATE(COUNT([ResourceUID]),FILTER(PSUserInfo,[tp_Title]<>MAX('newtable'[tp_Title]))))
    discount = IF(DISTINCTCOUNT('newtable'[tp_Title])>1,DISTINCTCOUNT([ResourceUID]),CALCULATE(DISTINCTCOUNT([ResourceUID]),FILTER(PSUserInfo,[tp_Title]<>MAX('newtable'[tp_Title]))))

    4.change other four visual's Field.

    The final output is shown below:

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Vasily_Zaytsev's avatar
      Vasily_Zaytsev
      Helper I

      Hello, in your solution selected value don't filter in table (it is selection). I meen, that I have only one value in table after selection.