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: 
pascos88
Creator II
Creator II

Above Function in qlik sense

Hi, 

I have a problem with the Above () function in a table. 

I have a simple table like : 

Name      Surname        Year               Sales      Above(max(Salese))

A                      T                   2015            1000             800

A                      T                   2014            800               1500

A                      T                   2013            1500                  -

B                      U                   2015            800             900

B                      U                   2014           900             700

B                      U                   2013           700              -

 

The problem is, the Above() function work just if in the table I have 2 dimension (Name and Year).

Once I try to add more dimension the function doesn't work anymore. 

How I can exclude the other dimension in the function and just considering for instance above(Sales) of the Year just on Name, Surname.

Thanks for any helps 

Best 

 

1 Solution

Accepted Solutions
sunny_talwar

Can you try this

Aggr(Above(Sum(Sales)), Name, Year)

or

Aggr(Below(Sum(Sales)), Name, Year)

View solution in original post

6 Replies
pascos88
Creator II
Creator II
Author

Nobody can help ? 

 

Thanks 

sunny_talwar

What other dimensions are you adding? Do you have a sample where you can show the issue?
pascos88
Creator II
Creator II
Author

Sure, table with 2 dimension Name and Year  works fine 

Name        Year               Above(max(Salese))

A                   2015                  800

A                  2014                  1500

A                  2013                        -

B                  2015                     900

B                 2014                      700

B                 2013                       -

 

table with Name Surname Year Sales the Above() doen't work.

Name      Surname        Year               Sales      Above(max(Salese))

A                      T                   2015            1000            -

A                      T                   2014            800             -

A                      T                   2013            1500            -

B                      U                   2015            800             -

B                      U                   2014           900             -

B                      U                   2013           700              -

 

It will be good if the function will always works. 

look that above with all dimension is on all of them. But I would force the above just on the name and year. 

Best

pascos88
Creator II
Creator II
Author

Sure, table with 2 dimension Name and Year  works fine 

Name        Year               Above(max(Salese))

A                   2015                  800

A                  2014                  1500

A                  2013                        -

B                  2015                     900

B                 2014                      700

B                 2013                       -

 

table with Name Surname Year Sales the Above() doen't work.

Name      Surname        Year               Sales      Above(max(Salese))

A                      T                   2015            1000            -

A                      T                   2014            800             -

A                      T                   2013            1500            -

B                      U                   2015            800             -

B                      U                   2014           900             -

B                      U                   2013           700              -

 

It will be good if the function will always works. 

look that above with all dimension is on all of them. But I would force the above just on the name and year. 

Best

pascos88
Creator II
Creator II
Author

Sure, table with 2 dimension Name and Year works fine

Name      Year          Above(max(Salese))

A                 2015              800

A                 2014             1500

A                   2013             -

B                  2015              900

B                  2014               700

B                  2013                   -

 

table with Name Surname Year Sales the Above() doen't work.

Name    Surname    Year          Sales    Above(max(Salese))

A                      T              2015       1000          -

A                      T               2014       800           -

A                      T              2013       1500          -

B                     U              2015       800 -

B                    U               2014       900 -

B                    U               2013     700 -

 

It will be good if the function will always works.

look that above with all dimension is on all of them. But I would force the above just on the name and year.

Best

sunny_talwar

Can you try this

Aggr(Above(Sum(Sales)), Name, Year)

or

Aggr(Below(Sum(Sales)), Name, Year)