Forum Discussion

AllanBerces's avatar
AllanBerces
Post Prodigy
2 months ago
Solved

Containssting

Hi can anyone correct my calculated column, coz still show value suposedly not. What i required is only with the word OVERDUE   OverdueSummary = VAR IsStatusOverdue = CONTAINSSTRING('Combined'[Sta...
  • InsightsByV's avatar
    2 months ago

    Hi,

     

    You can use: 

     

    OverdueSummary =
    VAR StatusValue = TRIM(UPPER('Combined'[Status]))
    VAR LoadoutValue = TRIM(UPPER('Combined'[Loadout]))
    RETURN
    IF(
        StatusValue = "OVERDUE" || LoadoutValue = "OVERDUE",
        "OVERDUE",
        BLANK()
    )

     

    Let me know if that worked.

     

    If this helped, mark this answer as a solution. Kudos are appreciated!

  • Kedar_Pande's avatar
    2 months ago

    AllanBerces 

     

    OverdueSummary = 
    VAR IsStatusOverdue = COALESCE(CONTAINSSTRING('Combined'[Status], "OVERDUE"), FALSE)
    VAR IsLoadoutOverdue = COALESCE(CONTAINSSTRING('Combined'[Loadout], "OVERDUE"), FALSE)
    RETURN IF(IsStatusOverdue || IsLoadoutOverdue, "OVERDUE", BLANK())


    If rows still show wrong, your source text likely has extra spaces. Wrap each column in TRIM:

    CONTAINSSTRING(TRIM('Combined'[Status]), "OVERDUE")


    If this answer helped, please click 👍 or Accept as Solution.
    -Kedar
    LinkedIn: https://www.linkedin.com/in/kedar-pande