Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
GOKULAKANNAN
Creator II
Creator II

Set analysis

I have a table, table1:

load * inline
[
country,sales
india,10
afg,20
pak,30
aus,50
]

 and am creating a KPI which should display the value sum(sales) for india, for that i have used set analysis

sum({<country={'india'}>}sales), Now my requirement is, by default it should show the sum(sales) for india, but when user made any selection it should show value for that(i.e if user selecting country aus, then it should show the value of 50) how can i acheieve that, 

 

Labels (1)
2 Replies
brunobertels
Master
Master

Hi 

Try this 

 

if(isnull(
GetcurrentSelections(country)),
sum({<country={'india'}>}sales),
sum(sales))

Sivapriya_d
Creator
Creator

Hi ,

Check if this helps.
If(GetSelectedCount(country)=0,Sum({<country={'india'}>}sales),Sum(sales))

Thanks,