Forum Discussion
Difference b/w Normar Switch & Switch with TURE()
- 10 months ago
Hi Koritala ,
Could you let us know if your issue has been resolved or if you are still experiencing difficulties? Your feedback is valuable to the community and can help others facing similar problems.
Hi Koritala ,
Thank you for reaching out to the Fabric Community. GeraldGEmerick provided a clear explanation. To add, the regular SWITCH() function is ideal when comparing a single value to several options, much like the CASE statement in SQL. On the other hand, SWITCH(TRUE()) offers more flexibility for checking multiple conditions and can help simplify logic compared to using many nested IF statements.
In terms of performance, there isn’t a significant difference between the two; the choice mainly depends on the complexity of your conditions and which method is easier to read and maintain.
Thanks for quick response GeraldGEmerick .
Regards,
Yugandhar