Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
GOKULAKANNAN
Creator
Creator

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,