The app is experiencing performance issues due to inefficient calculations in a master measure that processes the field TransactionName, which has a complex structure (e.g., "1_ABCDEFGHI_23454"). Let’s analyze the available options and whyOption Bis the best solution.
A. Ask the developer of the underlying database to change the structure of the field TransactionName.While modifying the data structure in the underlying database might improve performance, this approach is not ideal. It’s a time-consuming process that might not be feasible, especially when working with large datasets that have already been integrated into the Qlik Sense app. The performance improvement should focus on optimizing the Qlik app itself.
B. In the Data manager, use the Split function to split the field values with the underscore character as the separator. In the Data manager, use the Add calculated field function to multiply the 1st and the 3rd column of the split field. Reload the data.This is the most efficient approach. By using theSplit functionin the Data Manager to break down the TransactionName field based on the underscore separator, the data becomes more accessible for calculations. You can then create a calculated field that multiplies the first and third components of the split data (corresponding to the 1st part and the numeric identifier at the end). This reduces the need for complex string manipulation functions (e.g., Left, Right, Trim) within the master measure, which can be resource-intensive when applied to large datasets.
C. Change the master measure definition as follows: subfield( TransactionName, '',!) * subfield( TransactionName, '', 3)This option suggests using thesubfield() functionto split the string within the master measure itself. While this approach is valid, it doesn’t provide as significant a performance improvement compared to pre-processing the data in theData Manager. Calculating fields directly within the visualizations is more computationally expensive compared to handling it during the data load phase.
D. In the Data manager, use the Replace function to remove the middle part of the field TransactionName.TheReplace functionwould remove the middle section of the transaction name, but it doesn’t address the need to split the field for efficient multiplication. It would also result in a loss of important data that may be required for other analyses.
Key Qlik Sense Business Analyst References:
TheData Managerprovides powerful tools for transforming and optimizing data before it is used in visualizations. Pre-processing the data using functions likeSplitsignificantly reduces the load on front-end visualizations.
Splitting fields during the data load rather than in the master measures improves performance, especially in large datasets where string manipulation functions in visualizations can degrade performance.
Calculated fieldsallow analysts to create new expressions based on transformed data, ensuring that the app remains efficient while meeting analytical needs.
Thus, the correct solution is touse the Split function to separate the field values and then use a calculated field to multiply the required components, which enhances app performance.