Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
I tried to create a loop to collect the 50th percentile of many parameters using the following code, but both elements in "test_list" are the same (they are both 50% of weight). However, if I run the lines manually, it will work. Can I not use the Col Quantile() function in the for loop?
I tried to create a loop to collect the 50th percentile of many parameters using the following code, but both elements in "test_list" are the same (they are both 50% of weight). However, if I run the lines manually, it will work. Can I not use the Col Quantile() function in the for loop?
Yes, this is a bug. The developers have verified it is a caching issue with Col Quantile [& Col Median] specifically. The other Col functions do not have the issue. Using Substitute makes a new expression with each iteration of the loop so that caching does not get used improperly. Thanks for reporting this and I will file a bug report.
So, under the line, it's not Substitute, but the protection via Eval(Expr()) which fixes the bug.
nice example from @Arn_Cota [adapted version] illustrating the effect: