Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bar chart with two Dimension and a Calculated Expression

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.

4 Replies
Gysbert_Wassenaar

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;


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

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.

Gysbert_Wassenaar

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.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Ok!

but how can I pass the input variable in user interface to the "Multiplier"?