Forum Discussion

shikhavidyarthi's avatar
shikhavidyarthi
Frequent Visitor
3 years ago
Solved

Show/Hide Columns in Line Chart Visuals with Multiselect Slicer in Power BI #Line Chart, # Slicers,

I have a line chart with 4 columns added like below. My X -axis is operating_dates.

Now the users feel that lines seem to be crowded sometimes. Do we have an option to select two/three lines only at a time.

 

I tried creating this but I am able to select only one line at a time by using below steps.
Created a new table as slicer table:

Then create a measure as user selection:

User Selection = SELECTEDVALUE('Slicer Table'[Value])
Create a new measure:
calculation =
SWITCH(
    TRUE(),
    [User Selection] = "Act_Pkgs", sum(Data[act_pkgs]),
    [User Selection] = "EDP_Pkgs", sum(Data[edp_pkgs]),
    [User Selection] = "NOP_Pkgs", sum(Data[nop_pkgs]),
    [User Selection] = "Prev_Yr_Act_Pkgs", sum(Data[prev_yr_act_pkgs]),
    "Select any Calc"
    )
 
This way I can select only single calculation at a time. If I try to select two its displaying as blank because I am asking for two different calculation at a time.

I want two or three lines to select with color coding.

2 Replies