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 Normal Calamity Urg...
  • tamerj1's avatar
    3 years ago

    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
    )
    )