Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Matrix Visual - creating a measure with IF statement

Hi all!   I am back with more questions.   This time, I want to ask whether it is possible to a make possible to incorporate an IF statement when creating a measure.   Suppose I have the follow...
  • mlsx4's avatar
    mlsx4
    3 years ago

    Hi Anonymous 

     

    Try this (modify values as you need):

     

     

    Measure = 
    var _column= SELECTEDVALUE(Sheet1[Obligation Type])
    var _suma= SUM(Sheet1[Set-off / payment amount])
    return
        SWITCH(_column,
        "VAT", (_suma)*0.25,
        "WHT 23",(_suma)*0.3,
        "WHT 21", (_suma)*0.21,
        "WHT 4(2)", (_suma)*0.x,
        _suma)