Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Visual to make a Linechart clearer/ filter columns

Hi guys,

is it possible to filter the lines in Power Bi with a visual?

The lines in the line chart represent different locations (each line is a column). But as you can see it is very confusing, there is a visual with which I can quickly display only 2 or 3 lines. So I am looking for a more elegant solution than having to delete or add the columns one by one to the line chart.

 

greetings Lukas

  • Hi Anonymous ,

     

    I have create a simple sample data for your reference. Here is my sample data:

    First we need to create a new table that contains all value your want to show in legend:

     

    Then use the column in the new table for legend of line chart and the following measure as Value of line chart:

     

    measure = SWITCH(SELECTEDVALUE(Slicer[slicer]),"legend1",SUM('Table'[legend1]),"legend2",SUM('Table'[legend2]),"legend3",SUM('Table'[legend3]))

     

    Then you can use the slicer for controlling the legends you want to show:

     

     

    For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/Eb1bSm7LP61DgMLXwhMnfiIBrLwO_3-DUZn-Y2NS241NFw?e=gZhTRd

     

    If this post help, please consider accept it as the solution to help other member find it more quickly.

     

    Best Regards,

    Dedmon Dai

     

     

3 Replies