Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
Can anyone please say me the difference between IF statement and set analysis
Is it possible to use IF statement instead of set analysis? if it is please explain me
Thanks in advance
Hi Logesh,
We can use both If and Set Analysis expression, but when compared the Set Analysis has upper hand by performance and ease of usability. If you have many conditions then you have use many if else and logical operators but in set analysis it is very very simple.
Using If() will have performance issues, since we need to evaluate row wise.
Set Analysis has some good features like P() and E(), which is not possible with If easily.
Hope this helps you.
Regards,
Jagan.
You can very well use If instead of Set analysis. But the performance will be better if you use set analysis, where as it will be impacted while using if statements.
Creating a flag in the balck end and using it in set analysis is always preferable.
-Sundar
Both If and Set Analysis are one kind of functions.
The only difference is that by using set analysis, we can increase the performance.
Because set analysis made on numeric fields yield better performance when compated to set analysis made on text
1. sum({<Country={'India','Chine'}>}sales)
2. sum({<country_check_flag={1}>}sales)
2 performs best when compated to 1
-Sundar
Hi Logesh,
We can use both If and Set Analysis expression, but when compared the Set Analysis has upper hand by performance and ease of usability. If you have many conditions then you have use many if else and logical operators but in set analysis it is very very simple.
Using If() will have performance issues, since we need to evaluate row wise.
Set Analysis has some good features like P() and E(), which is not possible with If easily.
Hope this helps you.
Regards,
Jagan.
Thanks for your replies...very useful