Forum Discussion
Multiple Condition
Hi Chanleakna123,
You can create a calculated column:
Column = SWITCH(TRUE(),Table1[Code]=4223 && 'Table1'[DOI]>7,"High",Table1[Code]=4223 && Table1[DOI]<4,"POS",Table1[Code]=4223 && Table1[DOI]<0.5,"OOS",'Table1'[Code]=4983 && Table1[DOI]>2,"High",Table1[Code]=4983 && Table1[DOI]<1,"POS",Table1[Code]=4983 && Table1[DOI]<0,"OOS")
See attached pbix file.
Best Regards,
Qiuyun Yu
v-qiuyu-msft HI , i had used your file and see the formula but in the column shown nothing
- v-qiuyu-msft8 years agoCommunity Support
Hi Chanleakna123,
Take the example of the first condition, in your sample data doesn't have record meet the condition when Code is 4223 and DOI >7. You can check the condition one by one and compare to your sample data.
Best Regards,
Qiuyun Yu- Chanleakna1238 years agoPost ProdigyHi dear ,
If 4223 and 4879 have the same condition, what should I add in the dax condition formula ? It’s about “ ... =4233,4879 && .... ? Connected this 2 something like this ? Your response is so much appreciated.- v-qiuyu-msft8 years agoCommunity Support
Hi Chanleakna123,
You can update the calculated column like below:
Column = SWITCH(TRUE(),(Table1[Code]=4223 || Table1[Code]=4879) && 'Table1'[DOI]>7,"High",(Table1[Code]=4223 || Table1[Code]=4879) && Table1[DOI]<4,"POS",(Table1[Code]=4223 || Table1[Code]=4879) && Table1[DOI]<0.5,"OOS",'Table1'[Code]=4983 && Table1[DOI]>2,"High",Table1[Code]=4983 && Table1[DOI]<1,"POS",Table1[Code]=4983 && Table1[DOI]<0,"OOS")
See attached pbix file.
Best Regards,
Qiuyun Yu