Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
jplozano
New Contributor

Set Analysis on Date

Hi.

I have some problems with my set analysis. I have a date dimension called Fecha_Valor (DD/MM/YYYY) and a measure called Liquidez.

If i select the date 05/01/2018, i want the liquidez value for 04/01/2018. Im triying with this

sum({$ < Fecha_Valor={'$(=Only(Fecha_Valor)-1)'} > } Liquidez) but it doesn´t work.

If I try sum({$ < Fecha_Valor={'$(=Only(Fecha_Valor))'} > } Liquidez), i can see the value for the date filter.

Could you help me please?

Regards

1 Solution

Accepted Solutions

Re: Set Analysis on Date

Try this

Sum({$<Fecha_Valor = {"$(=Date(Only(Fecha_Valor)-1))"}>} Liquidez)

4 Replies

Re: Set Analysis on Date

Try this

Sum({$<Fecha_Valor = {"$(=Date(Only(Fecha_Valor)-1))"}>} Liquidez)

kfoudhaily
Contributor III

Re: Set Analysis on Date

define a variable first, in your variable editor:

v_GetLastDay = if(getselectedcount(Fecha_Valor)=0, today()-1, GetFieldSelections(Fecha_Valor)-1)

I have added the condition to select automatically yesterday when no date is selected in fetch_valor but I would have prefered doing that in the master calendar date field because Fecha_Valor might be not continuous.

then your expression should be:

sum($<Fecha_Valor{"=$(v_GetLastDay)"} = Liquidez)


regards,

jplozano
New Contributor

Re: Set Analysis on Date

this is the solution... What is the diference between " and ' in Set Analysis?

Re: Set Analysis on Date

Check them out here

Quotes in Set Analysis