Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I ma trying to add a calculation inside a field using expression but couldn't get to it yet.
Here's what I am trying to do: On my last post (How to create another Column in script) I had created a "Table 3", now I would like to create a chart with those datas, using "date of maintenance" and "type of maintenance" as a Dimension and "=sum(US$)" as a expression. For now this is ok, but I would like to multiply an specific "type of maintenance" per a variable, for instance, as we look on the post there is a "type of maintenance" called yyy. I would like to take it and then multiply by 100.
Does someone have an idea on how do I get that?
Thanks in advance.
You could add a mapping table to the script and then add a multiplier field to table3 that can be used to multiply the amount with:
MapMP:
Mapping Load * Inline [
Maintenance, Multiplier
yyy, 100
XXX, 80
ZZZ, 50
];
FinalTable:
LOAD *,
Date(Delivery + [Timeframe (Days)]) as [Date of Maintenance],
ApplyMap('MapMP',[Type of maintenance],1) as Multiplier
Resident Table;
DROP Table Table;
hi gysbert! Thanks for your answer.
In your example is good when you know all the values that will be multiplied. In my case, user will input the value and qlikview should calculate it.
In that case you can try adding a new table with an Input Field
INPUT FIELD Multiplier;
Multipliers:
LOAD distinct [Type of Maintenance], 1 as Multiplier
Resident FinalTable;
Users can change the Multiplier values in a Table box with the two fields of the Multipliers table.
Ok!
but how can I pass the input variable in user interface to the "Multiplier"?