Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Filter by multiple column headings

Problem Statement: I have a table with multiple feature Columns. I have to show the aggregated value of those feature column on a line or bar chart. I need one slicer where all these Feature columns get listed and if I select any of the Feature it should show only that value. Basically, it should filter on my slicer.

I created another table with unpivoted columns from the original table and Renamed attribute as Features. Now, I have the list but both the tables are not connected to each other and hence unable to filter. Need help to resolve this issue. I cannot unpivot and use the attribute column in the same original table as it will expand the row count into millions.

  • Hi Anonymous 

     

    If you want aggregated results, you can aggregate them in Power Query directly by using Group By feature. 

     

    After unpivoting, group by Attribute column and get aggregated values in a new column. For example in above image, I calculate Sum for each group member. 

     

    Then use this new structured table to create a bar chart. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.

3 Replies

  • Anonymous , when you unpivoted the table to have feature as row, then you can take slicer from that column or you can join the two table.

     

    Or create a table 

    measure =

    var _tab = allselected(Feature[feature])

    return

    calculate(sum(Table[value]), filter(Table, Table[Feature] in _tab))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi amitchandak : This will not work. I cannot unpivot in the original table. So created a separate table. Now, how do i join these 2 tables.

  • v-jingzhang's avatar
    v-jingzhang
    Community Support

    Hi Anonymous 

     

    If you want aggregated results, you can aggregate them in Power Query directly by using Group By feature. 

     

    After unpivoting, group by Attribute column and get aggregated values in a new column. For example in above image, I calculate Sum for each group member. 

     

    Then use this new structured table to create a bar chart. 

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.