Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get latest value from table

Hi!

I have 3 columns on a straight table:

=YearMonth

=Transaktio_taloustieto_item

=Sum({<Transaktio_taloustieto_mittari_sarja={'Actual'},Transaktio_taloustieto_item={'Net sales 2018 estimate'}>}Transaktio_talotieto_amount)


This returns to me the following data:


sales.png


I would like it to return me only the last amount entered ( in this case Nr 1.) My goal is to have this formula added to a chart as a bar that has a yearly dimension. but it should only show the latest value inside that year.


Any ideas how to accomplish this?  




2 Replies
sunny_talwar

May be this

Dimension

Transaktio_taloustieto_item

Expression

FirstSortedValue(DISTINCT Aggr(Sum({<Transaktio_taloustieto_mittari_sarja={'Actual'},Transaktio_taloustieto_item={'Net sales 2018 estimate'}>}Transaktio_talotieto_amount), Transaktio_taloustieto_item, YearMonth), -YearMonth))

Anonymous
Not applicable
Author

Thanks Sunny,

It works when the dimenstion is set to Transaktio_taloustieto_item. But im using a combo chart, and the only dimension is  Year. Can you think of any way how to get it working in a combo chart, so that it would show the last value entered ?

Example:

If 2016 Q1=1, q2=4, Q3=3, Q4= empty, it should show 3 as for the year 2016 value.