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: 
sakshikaul
Creator II
Creator II

Expression to calculate net sold quantity

Hi all,

I have a querry regarding creating a sell through report. Following is the expression which shows the comparison between two seasons

=sum({stateperA< [Season Code]={'17A'} >} quantity_sold)

- sum({stateperA< [Season Code]={'17A'} >} quantity_returns)

Following above code is giving correct result but I want the user should have a freedom to select any season code so how to write an expression for the same ?

17 Replies
ogautier62
Specialist II
Specialist II

Hi,

remove set analysis and let user choose with a list box selection ?

it's native functionality in qlik

regards

sakshikaul
Creator II
Creator II
Author

Hi

I am getting exactly same figures for both the seasons.I have used following expressions

Qty recvd(LY)

=sum({stateperA} quantity_received)

Qty Recvd(CY)

=sum({stateperfB} quantity_received)

qlik.png

ogautier62
Specialist II
Specialist II

I don't understand very well

could you share a sample and expected result,

and what are the states stateperA and stateperB

thank you

manoranjan_d
Specialist
Specialist

go with dynamic selection set analysis in the expression

example

=sum({<B1=$::B1>}C1)

or

=sum({<B1=p(B1)>}C1)

balabhaskarqlik

Create a List box of [Season Code], then the values selected from this field, passed to Set Analysis.

=sum({stateperA< [Season Code] = {'$(=getfieldselections([Season Code]))'} >} quantity_sold)

- sum({stateperA< [Season Code] = {'$(=getfieldselections([Season Code]))'} >} quantity_returns)

sakshikaul
Creator II
Creator II
Author

Hi

This is not giving any result

sakshikaul
Creator II
Creator II
Author

This is not giving result. I am getting values as 0

Anonymous
Not applicable

Hi,

Create Variable create input box .Ask User To enter the input of respective season code.

use that variable in set expression and write the formula as below.

Thanks

Ritesh

raman_rastogi
Partner - Creator III
Partner - Creator III

Hi,

May be like this

Remove set analysis and use expression

=sum(quantity_sold) - sum( quantity_returns)

Create one list box of season code and Check list box property Always one value selected.