Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
jplozano
Contributor
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
sunny_talwar

Try this

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

View solution in original post

4 Replies
sunny_talwar

Try this

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

View solution in original post

kfoudhaily
Creator III
Creator III

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,

QlikView Qlik Sense consultant
jplozano
Contributor
Contributor
Author

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

sunny_talwar

Check them out here

Quotes in Set Analysis