cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shikhavidyarthi
Frequent Visitor

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.

shikhavidyarthi_0-1675983215870.png

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:

shikhavidyarthi_1-1675983349133.png

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.
shikhavidyarthi_2-1675983543757.png

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

1 REPLY 1
amitchandak
Super User
Super User

@shikhavidyarthi , Use field parameters

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting
: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors