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

Problem with Above function

Hi All,

The table is showing 2018-2019 data and they want compare sales side by side for the month level,So I have Used above() function to get the required output but in first cell it showing null. I suppose to get value from previous year (2017-2018) value. Is there any way to get required output.The expression like Sum(Sales) = Sum({<Year={max(Year)}>} Sales) and Prev Sales =   Above(Sum({<Year={max(Year)}>} Sales).                         

    Here Max(Year) is 2018-2019.

 

Please help me

Thanks in advance!

regards

Venkey.

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Try the following;

https://community.qlik.com/t5/New-to-QlikView/First-value-in-above-function/td-p/702033

May take a bit of work with your field names/months (depending how they are set), but should work.

Cheers,

Chris.

Vegar
MVP
MVP

You do not need to use ABOVE, you could just use plain sum aggregation of you adjust your expressions a bit.

Latest year
Sum({<Year={"$(=max(Year))"}>} Sales)

Previous year
Sum({<Year={"$(=max(Year)-1)"}>} Sales)