Qlik Sense Dynamic numeric formatting in a pivot table
Hi all
I have created a "Self-service" report using a pivot table where the user select dimensions and measures from a list of available Dimensions and Measures. These are stored in code as follows (extract):
The "Metric Formula" is a series of Master Items that have in their definition the formatting of each master item (percent, money, integer). When I make my selections of what dimensions and measures I want on the report, the formatting that I defined when I creatred the master items is not obeyed.
Because my report is dynamic, my measure expression on the pivot table is something of the order of:
For the formatting someone suggested incorporating something like:
if (Getfieldselections(MetricType)='Percent',num(sum(per_sales)/100,'#,##0%' ),Num(sum(sales),'#,##0'))
Anyone know I can incorporate the above methodology (shown in italics) which in effect replaces "Sum(per_sales)/100" with my rather more complex =$(=FirstSortedValue([MetricFormula],[MetricNo],1))