Forum Discussion

Sam01's avatar
Sam01
Frequent Visitor
7 years ago
Solved

Matrix returning rows with no data once text and numeric values are concatnated

Hello community,   I have matrix that has measure duration in HH:MM:SS format , once I add this measure it returns all rows dimension. On below screenshot row A shouls not be displayed. If i remove...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Sam01 -

    You can use an IF statement - something like this, which checks to see whether Call Duration is blank. If it's blank, thn this measure will also be blank:

    Call Duration (HH:MM:SS) =
    IF(ISBLANK([Call Duration]),BLANK(),
    VAR hours =
    ROUNDDOWN ( [Call Duration] / 3600, 0 )
    VAR minutes =
    ROUNDDOWN ( MOD ( [Call Duration], 3600 ) / 60, 0 )
    VAR seconds =
    INT ( MOD ( [Call Duration], 60 ) )
    RETURN
    FORMAT(hours,"00") & ":"
    & FORMAT(minutes, "00")
    & ":"
    & FORMAT(seconds, "00")
    )