Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this

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

View solution in original post

4 Replies
sunny_talwar
MVP
MVP

Try this

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

kfoudhaily
Partner - Creator III
Partner - 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
MVP
MVP

Check them out here

Quotes in Set Analysis