Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Karim_Khan
Creator III
Creator III

Selection criteria sum

HI Team,

    I have two list boxes [Sales Level 1] and [Sales level 2].I wanted to fetch the value on the basis of below logic

sum( [Sales level 2])/ sum([Sales level 1]).

But Sales Level 1  is a Parent like

AMERICAS

and Sales level 2 is child  like CANADA,LATAM,US etc.

The Sales Level 1 and Sales Level 2 has the dynamic value.By applying below expression for [Sales level 2] calculation its not working dynamically.

=sum({$<[Sales Level 2]=>}[Net Bookings])

KK
4 Replies
sunny_talwar

Not sure I completely understand, would you be able to share few lines of data with your expected output??

kkkumar82
Specialist III
Specialist III

Hi,

I think you want to have aggregated value based on  Sales Level1 ,so I suggest

aggr( sum({$<[Sales Level 2]=>}[Net Bookings]), [ Sales Level 1] )

Hope I got you.

Thanks

Kiran Kumar

Karim_Khan
Creator III
Creator III
Author

Sir,

I have tried this expression

=sum({$<[Fiscal Year] = {$(=only([Fiscal Year]))},[Month in Fiscal Year] = {'<=$(=only([Month in Fiscal Year]))'},CATEGORY={'IOT'},[Sales Level 2]={"$(vSel2)"}>} [Net Bookings])

which is giving me the correct value for CANADA YTD.

and for AMERICAS

=sum({$<[Fiscal Year] = {$(=only([Fiscal Year]))},[Month in Fiscal Year] = {'<=$(=only([Month in Fiscal Year]))'},CATEGORY={'IOT'},[Sales Level 1]={"$(vSel1)"}>} [Net Bookings])

It is giving the total of all Sales Level 2 which comes under Amercias Sales Level 1. YTD

But whenever I deslect and select then the value gets blank for First expression

Pls suggest

KK
Anonymous
Not applicable

Are you essentially looking for sales numbers that make up a region?

Try this:

Aggr(sum([Sales Level 2]/[Sales Level 1]), [Sales Level 1])