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)
Anonymous
3 years agoNot applicable
I uploaded the dummy file to dropbox for your reference: https://www.dropbox.com/scl/fi/5jngy5sj8wsd86mqcdsrj/Dummy-Data-for-Report.xlsx?rlkey=wlztk97eexhr2iw3f83otyjfv&dl=0
mlsx4
3 years agoMemorable Member
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)