Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

conditional slicer and table dashboard

Hello,

I have the following 2 tables and I created a Slicer with the right table:

 

In this filter, 

  • P1 are those incidents where Priority = 1
  • P1-P2 are those incidents where Priority = 1 or Priority = 2
  • P1-P3 are those incidents where Priority  = 1, or Priority = 2, Or Priority =3
  • P1-P4 are all incidents (no filtering)

I need to create Table dashboard in where, if Filter=P1, only shows incidents with Priority = 1, but if filter = P1-P2 the table shows all incidents P1 or P2... 

 

 

Could you give me a clue ? Thanks in advance.

 

 

Kind regards,

Jorge.

  • Hi Anonymous 

    You may create a measure like below and use it in visual level filter and set it =1.

    Measure =
    IF (
        SELECTEDVALUE ( 'Filter'[Order] ) = 1
            && MAX ( Incidents[Priority] ) = 1,
        1,
        IF (
            SELECTEDVALUE ( 'Filter'[Order] ) = 2
                && MAX ( Incidents[Priority] ) <= 2,
            1,
            IF (
                SELECTEDVALUE ( 'Filter'[Order] ) = 3
                    && MAX ( Incidents[Priority] ) <= 3,
                1,
                IF (
                    SELECTEDVALUE ( 'Filter'[Order] ) = 4
                        && MAX ( Incidents[Priority] ) <= 4,
                    1
                )
            )
        )
    )
    

    Regards,

2 Replies