Forum Discussion

francesg's avatar
francesg
Helper I
3 years ago
Solved

Multiple Slicer value with 2 condition

Hi Everyone,

 

I need help in DAX; my goal is:

1. when the user selects the Type slicer = "Backlog" and "Sales", the result is 0

2. when the user selects the Type slicer only "Backlog" or "Sales", the result is 0

3. when the user did not select any value in the slicer should show the "Amount" > ('table.amount")

My current dax which is not working, is:

Backlog Forecast =
VAR vtype =
SELECTEDVALUE('Forecast Inclusions'[Type])
RETURN
SWITCH(
TRUE(),
vtype = "Backlog", 0,
vtype = "Sales", 0,
vtype = "Backlog" || "Sales", 0,
vtype = "", ('All Measures'[Backlog Amount])
)

 

Appreciate anybody's help. Thank you 

 

 

 

 

4 Replies

    • francesg's avatar
      francesg
      Helper I

      Hi FreemanZ,

       

      Yes, this is the table we set for all measures. Created in SSAS/cube.  

      Thanks

  • You may try this:

    Backlog Forecast =
    VAR vtype =
    SELECTEDVALUE('Forecast Inclusions'[Type])
    RETURN
    SWITCH(
    TRUE(),
    vtype = "Backlog"0,
    vtype = "Sales"0,
    vtype = "Backlog" || "Sales"0,
    'All Measures'[Backlog Amount]
    )