Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
anat
Specialist II
Specialist II

total sales by selected sales

i have data like:

Country,State,sal

Ind,AP,100

Ind,DL,200

AUS,ST1,50

AUS,ST2,300

 

need to display :total sales/filtered value 

if no selection: total sales :650

If I make any selection 650/selected sales

if I select AP:650/100

if I select Ind:650/300

i am trying like sum(<Country=,State>sal)/sum(sal),this is working if made any selections,if no selection i am getting 1.

7 Replies
sergio0592
Specialist III
Specialist III

Hi,

It should works with  sum({1} sal)  --->650   and sum(sal)  ---> selected sales

anat
Specialist II
Specialist II
Author

If no selection made, value coming 650/650

anat
Specialist II
Specialist II
Author

any solution pls

sergio0592
Specialist III
Specialist III

'If no selection made, value coming 650/650'

Yes, ans what is for you the expected output when no selection made?

anat
Specialist II
Specialist II
Author

if no selection made value should be 650/1=650

sergio0592
Specialist III
Specialist III

Ok, try :

 

=if(GetSelectedCount(State)=0 and GetSelectedCount(Country)=0, sum({1} sal) / 1, sum({1} sal) / sum(sal))

 

anat
Specialist II
Specialist II
Author

Thanks for prompt reply, I am also trying same. Looking for alternative solution