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

To Display in text object max(cost) corresponding with year

LOAD * INLINE [
Year, cost
2010, 1000
2013, 2000
2014, 9000
2016, 6000
2018, 5000

];

i want to add missing years and

I want output like this in text object

2014=9000

2 Solutions

Accepted Solutions
sunny_talwar

Try this

=FirstSortedValue(Year, -Aggr(Sum(cost), Year)) & '=' & Max(Aggr(Sum(cost), Year))

View solution in original post

sunny_talwar

Or this if you only have a single cost for each year

=FirstSortedValue(Year, -cost) & '=' & Max(cost)

View solution in original post

3 Replies
sunny_talwar

Try this

=FirstSortedValue(Year, -Aggr(Sum(cost), Year)) & '=' & Max(Aggr(Sum(cost), Year))
sunny_talwar

Or this if you only have a single cost for each year

=FirstSortedValue(Year, -cost) & '=' & Max(cost)
Hareeshkommineni
Contributor III
Contributor III
Author

tq so much
it's very usefull