Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
SnehalGupta23
Contributor
Contributor

Formation of a variable.

I have a table in which there is a column called date, and based upon this column I want two variables one which shows all the previous data, when we select a date and the other all the after data including the selected date data.

I want all the data date wise, for example if we select today's date then all the data previous and all the data after it.

1 Reply
rubenmarin

Hi, Can you post some examples of the initial data and what you expect?

I'm not sure of what you want, maybe ste analysis can help, filtering an expression for the data lower than the date selected, like:

Sum({<DateField={"<$(=Date(Max(DateField)))"}>} ValueField)

And another:

Sum({<DateField={">=$(=Date(Max(DateField)))"}>} ValueField)

Working with dates might have some additional difficulty because of formats.

Also note that set analysis is calculated before the rows, so the max would be for the whle table, not row by row. For an expression working for different date values in a table column another tye of solution is needed.