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: 
paulyeo11
Master
Master

How to make my average stock amount display correctly ?

Hi All

When i select year = 2015 ,

How to make the average stock equal to  1,697 K ? Now it display 1,132 K when i set expression as average.

Kindly see my enclosed QV Doc.

Paul

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

You don't have any values for 15 March, so whatever you are getting is the right result but if you still want forcefully 1697, change your expressions as below

STOCK_OPEN

IF(sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_OPEN/1000)>0,

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_OPEN/1000))

STOCK_CLOSE

IF(sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_CLOSE/1000) > 0,

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_CLOSE/1000))

View solution in original post

2 Replies
MK_QSL
MVP
MVP

You don't have any values for 15 March, so whatever you are getting is the right result but if you still want forcefully 1697, change your expressions as below

STOCK_OPEN

IF(sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_OPEN/1000)>0,

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_OPEN/1000))

STOCK_CLOSE

IF(sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_CLOSE/1000) > 0,

sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} STK_CLOSE/1000))

paulyeo11
Master
Master
Author

Hi Sir

Thank you very much for your expression.

Paul