Forum Discussion

Jeffrey_VC's avatar
Jeffrey_VC
Helper III
3 years ago
Solved

constant line based on filter

Hello,

 

I'm trying to use a constant line into a stacked bar chart.

I want that the constant line is dynamic based on an filter.

 

This filter had three different values

  1. Normal
  2. Calamity
  3. Urgent

If I select for example "Urgent" the constant line must be 98% and when selected "Normal" the constant line must be 93%.

Hopefully someone can help me.

 

Jeffrey

  • Hi Jeffrey_VC 

    you may try something like 

    Line =
    IF (
    NOT ISEMPTY ( 'Table' ),
    SWITCH (
    SELECTEDVALUE ( SlicerTable[Value] ),
    "Calamity", 0.90,
    "Normal", 0.93,
    "Urgent", 0.98
    )
    )

2 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi Jeffrey_VC 

    you may try something like 

    Line =
    IF (
    NOT ISEMPTY ( 'Table' ),
    SWITCH (
    SELECTEDVALUE ( SlicerTable[Value] ),
    "Calamity", 0.90,
    "Normal", 0.93,
    "Urgent", 0.98
    )
    )