Forum Discussion
Anonymous
3 years agoNot applicable
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...
- 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)
mlsx4
Memorable Member
3 years agoHi Anonymous
I would recommend you to use a SWITCH statement:
SWITCH(Sheet1[Obligation Type],
"VAT", (Sheet1[Set-off / payment amount]) * 0.25,
"WHT 23", (Sheet1[Set-off / payment amount]) * 0.3,
... and so on )