Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

undefined

I am trying to create a calculated column in my table that uses multiple statements to determine what to display.
 
Expected outcome:
This is what I generally want it to look like.  I want the Matrix Priority column to be calcuated based on multiple different conditions (type of ticket, specific words in the short description column, and resolved by = blank)

 

 

Havent been able to figure it out with ContainsString.

 

 
Matrix Priority =
Switch(
True (),
'Tasks/Inc''s Combined'[result.short_description] = "JDSS New", "Now",
'Tasks/Inc''s Combined'[result.priority] = "2" && 'Tasks/Inc''s Combined'[result.closed_by] = " ", Now,
'Tasks/Inc''s Combined'[result.priority] <> "2" && 'Tasks/Inc''s Combined'[result.closed_by] = " ", Next,
)

 

Any help would be appreicated it!

 

B

 


 

  • Anonymous 

    Not sure the data type and how your table is constructed but can you try the following column

    Matrix Priority =
    VAR __Desc = 'Tasks/Inc''s Combined'[result.short_description]
    VAR __Priority = 'Tasks/Inc''s Combined'[result.priority]
    VAR __ClosedBy = 'Tasks/Inc''s Combined'[result.closed_by]
    RETURN
        SWITCH (
            TRUE (),
            CONTAINSSTRING ( __Desc, "JDSS New" ), "Now",
            __Priority = 2
                && __ClosedBy = BLANK (), "Now",
            __Priority <> 2
                && __ClosedBy = BLANK (), "Next"
        )
    

1 Reply

  • Anonymous 

    Not sure the data type and how your table is constructed but can you try the following column

    Matrix Priority =
    VAR __Desc = 'Tasks/Inc''s Combined'[result.short_description]
    VAR __Priority = 'Tasks/Inc''s Combined'[result.priority]
    VAR __ClosedBy = 'Tasks/Inc''s Combined'[result.closed_by]
    RETURN
        SWITCH (
            TRUE (),
            CONTAINSSTRING ( __Desc, "JDSS New" ), "Now",
            __Priority = 2
                && __ClosedBy = BLANK (), "Now",
            __Priority <> 2
                && __ClosedBy = BLANK (), "Next"
        )