Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Sum QTY Divied by 30

I need to add a measure in a field that only adds quantities of 30 60 90 120 150 180 210

Then divide the total by 30.

Example of what I tried

   

sum(if(Qty like 30,60,90,120,150,180,120,150))

//((Count(if(Qty=30, RxNo)))+(sum(if(Qty=60, RxNo *2))))+(sum(if(Qty=90, RxNo*3)))+(sum(if(Qty=120, RxNo*4)))+(sum(if(Qty=150, RxNo*5)))+(sum(if(Qty=180, RxNo*6)))+(sum(if(Qty=210, RxNo*7)))+(sum(if(Qty=240, RxNo*8)))

1 Solution

Accepted Solutions

Re: Sum QTY Divied by 30

Try with

Sum( {<quantities  = {'30','60','90','120','150','180','120','150'} >}  RxNo)


1 Reply

Re: Sum QTY Divied by 30

Try with

Sum( {<quantities  = {'30','60','90','120','150','180','120','150'} >}  RxNo)