Forum Discussion

NoaB's avatar
NoaB
Frequent Visitor
7 years ago
Solved

Change horizontal/constant line based on slicer selection

Hi,   Is there a way to change the constant line based off the slicer selection? I have a slicer with four different options and each of them have different capacities. Is there a way for a constan...
  • MFelix's avatar
    7 years ago

    Hi NoaB ,

     

    You need to add a measure that makes the calculation for each of your option on the slicer, something like this:

     

    Flat Line =
    SWITCH (
        SELECTEDVALUE ( Table2[Capacity] );
        "A"; 20;
        "B"; 25;
        "C"; 5;
        "D"; 40;
        80
    )

    This needs to be adjusted to your needs but as you can see below the numbers change accordingly

     

     

    Regards,

    MFelix