Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

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)
blueranger44_1-1647745793995.png

 

 

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

 


 

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@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"
    )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@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"
    )
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.