Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field that I am using to restrict data , something similar like below.
IF(sales_amount >0, country) , if there is sales amount only I display that country in the table then uncheck null field. I would like to know if there is anything I can do to replace if condition , not sure set analysis is feasible here since it is not a calculation.
Since If condition is used it is affecting the response time of the table.
Each UI object based on a virtual table which is derived from the underlying data-set - with a certain (specified) dimensionality and n expressions. Getting the appropriate dimensional-layer is quite resource-consuming and mostly single-threaded performed. The expression-evaluation happens afterwards and are instead to the dimensions mainly executed in multi-threads.
Therefore are filters in expressions per "real" set analysis often more performant as within dimensions. But as usual it depends on the specific use-case, for example is a single filter enough and applicable or would it necessary to repeat it in more/all dimensions/expressions and/or how the underlying data-model is designed and so on ...
Like above hinted it's not mandatory to find always the most performant way - within many scenarios you won't notice big differences and considerations in regard to complexity and maintainability might be more worth ...
Have you tried disabling "Include zero values" in the Data Handling section of the properties?
I am not brining any measures into the table. The sales I am using as a condition in a field.
Aggr( Only({$<sales = {">=sum(sales) = 0"}>} country), country)
=Aggr(Only({$<sales_amount = {">0"}>} country), country)
Thank you both, I thought about it, do you think this will have better performance over if condition. I heard aggr function also causes performance issues. I will test it on my end also.
The if-loop and the aggr() will have an impact on the performance whereby I guess that the aggr() with a "real" set analysis should perform better as the if-loop. Reason for this assumption is that the set analysis reduced the data-set before evaluating the remaining countries and the if-loop runs against the entire selection state. But it will also be depending of the data and the data-model. I think by rather smaller data-sets you won't notice a significant difference.
An alternatives may be to replace one of the dimensions with an appropriate expression and I could imagine that such approach is more performant as filtering the table with a calculated dimension.
Hi Marcus,
Can you explain it a bit more more if possible?
An alternatives may be to replace one of the dimensions with an appropriate expression and I could imagine that such approach is more performant as filtering the table with a calculated dimension.
Each UI object based on a virtual table which is derived from the underlying data-set - with a certain (specified) dimensionality and n expressions. Getting the appropriate dimensional-layer is quite resource-consuming and mostly single-threaded performed. The expression-evaluation happens afterwards and are instead to the dimensions mainly executed in multi-threads.
Therefore are filters in expressions per "real" set analysis often more performant as within dimensions. But as usual it depends on the specific use-case, for example is a single filter enough and applicable or would it necessary to repeat it in more/all dimensions/expressions and/or how the underlying data-model is designed and so on ...
Like above hinted it's not mandatory to find always the most performant way - within many scenarios you won't notice big differences and considerations in regard to complexity and maintainability might be more worth ...