Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

thewillemzelluf
New Contributor II

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

Tags (1)
8 Replies
dwforest
Valued Contributor

Re: set analysis filter

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'}

Re: set analysis filter

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
New Contributor II

Re: set analysis filter

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

sasiparupudi1
Honored Contributor III

Re: set analysis filter

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

yurgelmartina
New Contributor

Re: set analysis filter

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
Valued Contributor

Re: set analysis filter

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
New Contributor

Re: set analysis filter

Hi did not work.

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

desp.PNG

dwforest
Valued Contributor

Re: set analysis filter

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

Community Browser