topic How to calculate formulas stored in a column? in App Development
https://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838174#M69299
<P>Imagine you have a data island table with two columns, e.g. "Metric" and "Function". The function column contains a syntactically correct formula per metric which calculates its result over the remaining tables of the data model. Then create a table object in the UI and have Metric as dimension and the expression "$(=[Function])" as measure column. The output is an empty measure column unless I select one of the metrics in the dimension columns, then Qlik Sense Enterprise SaaS shows the correct result for the chosen metric. How do I need to formulate the expression so that it calculates the results for all rows right away? An empty sample QVF using the data model generated by hitting CTRL-0-0 in the load editor is attached</P>Wed, 22 Sep 2021 05:00:27 GMTStefanSonntag2021-09-22T05:00:27ZHow to calculate formulas stored in a column?
https://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838174#M69299
<P>Imagine you have a data island table with two columns, e.g. "Metric" and "Function". The function column contains a syntactically correct formula per metric which calculates its result over the remaining tables of the data model. Then create a table object in the UI and have Metric as dimension and the expression "$(=[Function])" as measure column. The output is an empty measure column unless I select one of the metrics in the dimension columns, then Qlik Sense Enterprise SaaS shows the correct result for the chosen metric. How do I need to formulate the expression so that it calculates the results for all rows right away? An empty sample QVF using the data model generated by hitting CTRL-0-0 in the load editor is attached</P>Wed, 22 Sep 2021 05:00:27 GMThttps://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838174#M69299StefanSonntag2021-09-22T05:00:27ZRe: How to calculate formulas stored in a column?
https://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838189#M69301
<P>This doesn't work because $ expansion happens outside the chart. That means when you have multiple measures in scope (not selected and reduced to one - which you see works), the $ expansion can't produce multiple row-wise expressions (which is desired). As an alternative, you could try with pick(match(... Something like:</P><P><FONT face="courier new,courier">Pick(Match(Metric,'A', 'B', 'C'),$(=Only({<Metric={A}>}Formula)),$(=Only({<Metric={B}>}Formula)),$(=Only({<Metric={C}>}Formula)))</FONT></P><P><span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tresesco_0-1632290492491.png" style="width: 400px;"><img src="https://community.qlik.com/t5/image/serverpage/image-id/62511iD67DC85D58708C55/image-size/medium?v=v2&px=400" role="button" title="tresesco_0-1632290492491.png" alt="tresesco_0-1632290492491.png" /></span></P><P> And to make it dynamic, try using Concat() to produce the expression.</P>Wed, 22 Sep 2021 06:03:59 GMThttps://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838189#M69301tresesco2021-09-22T06:03:59ZRe: How to calculate formulas stored in a column?
https://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838915#M69385
<P>Thanks <LI-USER uid="22949"></LI-USER> <SPAN>that was exactly the problem, your solution works perfectly and dynamically using concat(). Do you happen to know the max length of the concatenated string?</SPAN></P>Fri, 24 Sep 2021 06:21:58 GMThttps://community.qlik.com/t5/App-Development/How-to-calculate-formulas-stored-in-a-column/m-p/1838915#M69385StefanSonntag2021-09-24T06:21:58Z