Professional Documents
Culture Documents
SIB - Logical Function (Fungsi IF AND SWITCH)
SIB - Logical Function (Fungsi IF AND SWITCH)
Contoh 1:
Contoh 2:
Income Level = IF([Income]>=100000, ”High”,
IF([Income]>=50000,
”Medium”,
“Low”)
)
LOGICAL FUNCTION: FUNGSI SWITCH
Mengevaluasi ekspresi terhadap daftar nilai dan mengembalikan salah satu dari beberapa kemungkinan hasil ekspresi
MonthName = SWITCH(MONTH(DateTable[Date]),
1, "January",
2,"February",
3, "March",
4,"April",
5,"May",
Contoh 2 6,"June",
Contoh 1 7,"July",
8, "Aug",
Income Level = SWITCH(TRUE(),
[Income] 9,"Sep",
>=100000, "HIGH", 10, "Oct",
[Income] 11, "Nov"
>=50000,"MIDDLE"
"LOW" "Dec"
) )
TERIMAKASIH