Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

New measure (multiply two variables)

Hello,

I'd like to introduce a new measure into QS which is the multiplication of two existing measures, e.g. Total Weight Product = Weight per Piece X Number of Pieces, I've got both as a Dimension into QS, how can I create this new variable/dimension?

4 Replies
marcohadiyanto
Partner - Specialist
Partner - Specialist

Hi Mark,

have you ever use expression to create measurement?

1. Create a chart

2. Click add data to add dimension

3. Click add data to add measurement but you choose fx

2.png

4. It will show expression box, then you can put your two measurement at expression box.

3.png

Hope it helps

Regards,

Marco

Not applicable
Author

Hi Marco,

thanks - have done this before, however can you show me an example of a new dimension (WeightShipment) that is the multiple of the output of two existing measures, I seem to write the expression not in the correct way, i've put in the FX box:

=(Quantity)*(WeightperPiece)

However when I try to then create the Sum of the WeightShipment it only gives me the WeightperPiece (as if it did not take into account the expression.

ogster1974
Partner - Master II
Partner - Master II

YOu could create a new measure or dimension as a master item.  This can then be used over and over again in other charts and if you change it The changeapplies across all the charts it's in use in.  One draw back is at the moment you cannot use a mastert item directly in another expression.

HOpe this helps

ANdy‌

reddy-s
Master II
Master II

Hi Mark,

Try using two variable with expresions in iy:

like this:

$(Var1) * $(Var2)

where var1 can be count(quantity) and $(Var2) can be some other expression.

Thanks,

Sangram