Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
chooco_co
Valued Contributor

Re: New measure (multiply two variables)

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

Re: New measure (multiply two variables)

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
Honored Contributor II

Re: New measure (multiply two variables)

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‌

reddys310
Honored Contributor II

Re: New measure (multiply two variables)

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

Community Browser