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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
kris_vliegen
Partner - Creator III
Partner - Creator III

View data less then or equal te selected date in Straight table

Hi All,

I have a straight table and a listbox with year and 1 with month selection.

I would like to see data in my straight table from the month I selected and all the previous months.

Is this possible. Because now if I select an Year and Month I only see the data from that month.

Regards,

Kris

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ah, my mistake. You also need to 'reset' the selection in the other fields:

sum({<Year=,Month=,MyDateField={'<=$(=max(MyDateField))'}>} Amount)

You don't need your variable vMaxDatum. Simply use $(=max(MyDateField))


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

It should be easy if you also have a date field. You can use set analysis to show the data from the selected month and previous months: sum({<MyDateField={'<=$(=max(MyDateField))'}>} Amount)


talk is cheap, supply exceeds demand
jpenuliar
Partner - Specialist III
Partner - Specialist III

a Date range selection(with min max dates) may help you regarding your problem.

Date Selections - By Period &amp; Range

kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Thank you Gysebert for your reaction.

But as you can see in the screenshot I only see values of the selected month in my straight table.

The variable (vMaxDatum) is calculated as

=num(makedate(if( GetSelectedCount( _CalYear) > 0, _CalYear, max(_CalYear))  , if( GetSelectedCount( _CalMonth) > 0, num(_CalMonth), max(_CalMonth))  , if( GetSelectedCount( _CalDay) > 0, _CalDay, max(_CalDay))))

Date.JPG

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Ah, my mistake. You also need to 'reset' the selection in the other fields:

sum({<Year=,Month=,MyDateField={'<=$(=max(MyDateField))'}>} Amount)

You don't need your variable vMaxDatum. Simply use $(=max(MyDateField))


talk is cheap, supply exceeds demand
kris_vliegen
Partner - Creator III
Partner - Creator III
Author

Thank you!

Now I see it, it is indeed logical.