Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
thewillemzelluf
Creator
Creator

set analysis filter

hello i have 3 questions about set analysis.

1. can you use an alias in set analysis?

2. how to deal with space between words (can you use information management or doe you have to convert it to information.management)

3. Is this set analysis oke? i need to filter on Debiteur.administratienummer where it is 1.

Sum({$<"Debiteur.administratienummer" = {1}>} "Verkoop.bedrag.totaal")

thanks for your help

8 Replies
dwforest
Specialist II
Specialist II

1. alias becomes the field name????

2. enclose field names with spaces in [ ]

3. Yes that looks fine as long as its a numeric field otherwise = {'1'}

sunny_talwar

1) can you elaborate on this

2) put the words between single quotes or double quotes if it is a search string

3) looks good... only thing that you can add is the single quotes around the 1 (you don't need them, but better to have them)

Sum({$<"Debiteur.administratienummer" = {'1'}>} "Verkoop.bedrag.totaal")

thewillemzelluf
Creator
Creator
Author

thankyou all (sorry for the late reaction). It is working now

sasiparupudi1
Master III
Master III

please close this thread by marking any helpful and a correct answer

yurgelmartina
Contributor
Contributor

Hello,

I needed to do two expressions but not very familiar with the sintax...

Could you please help me not working.

=if(sum({$<Dia =  {'13/05/2018'} >} StockLoja) > sum({$<Dia =  {'16/04/2018'} >} StockBuffer),'1','0')

=if(sum({$<Dia =  {'13/05/2018'} >} StockLoja) > sum({$<Dia =  {'16/04/2018'} >} StockBuffer),

sum({$<Dia =  {'13/05/2018'} >} StockLoja)-sum({$<Dia =  {'16/04/2018'} >} StockBuffer,

'0')

dwforest
Specialist II
Specialist II

If Dia = a date, I've found Qlik only works consistently when the criteria is a number.

     =if(sum({$<Dia =  {43233} >} StockLoja) > sum({$<Dia =  {43206} >} StockBuffer),'1','0')


Date values are dual (numeric and string) and *should* work if the default format for the date/timestamp matches your criteria, but in Set Expressions it seems to work best if you use numeric criteria.

yurgelmartina
Contributor
Contributor

Hi did not work.

=if(sum({$<Date = {43233} >} ESTOQUETOTAL) > sum({$<Date = {43233} >} BUFFER),'1','0')

desp.PNG

dwforest
Specialist II
Specialist II

In your first example it was 2 different dates, not the same.

Validate values by putting each part of formula in a straight to see if each piece evaluates as expected.

When not working, please provide complete sample data and expected outputs for further help