Forum Discussion

patricia_csf's avatar
patricia_csf
Regular Visitor
5 years ago
Solved

Filter selected users (obtained from one filter selection) and extend data to this user group

Hi,  I have one table in which I used a filter (e.g. color blue). I managed to have a table with ALL colors (used "ALL" into the formula), so that I can compare, in this example, color blue with al...
  • v-robertq-msft's avatar
    5 years ago

    Hi, patricia_csf 

    According to your description, I think that you want to get the count of categories of color which is linked to the selected users, you can try my method:

    This is my test data:

     

    1. Create a calculated table ‘Slicer’:
    Slicer = SUMMARIZE('Table',[Color])

     

    1. Create a measure [Count of color by selected users]:
    Count of color by selected users =
    
    var _selectedcolor=SELECTEDVALUE(Slicer[Color])
    
    var _Filter1=SELECTCOLUMNS(FILTER('Table',[Color]=_selectedcolor),"User",[User])
    
    var _Filter2=SELECTCOLUMNS(FILTER('Table',[User] in _Filter1),"Color",[Color])
    
    var _summarize=SUMMARIZE(_Filter2,[Color])
    
    return COUNTX(_summarize,[Color])

     

    1. Create a Slicer(place ‘Slicer’[Color]) and a card chart and place the measure created before, and you can get what you want, like this:

     

    You can download my test pbix file here

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.