Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
paulyeo11
Master
Master

SET expression with Avg how to make it work in table and chart ?

Hi All

I have SET expression for chart 1 is show correctly:-

=(Avg({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} (STK_OPEN+STK_CLOSE)/2))

I use the same expression at Table 1  i need it display 12.5 , now it display 7 , how to make it display 12.5

when i click on month = 2 chart display Feb = 2.5 is correct , how to make tabble 1 display as 2.5 instead of 2 ?

Paul

1 Solution

Accepted Solutions
rubenmarin

Hi paul, in table don't works because you're asking for month less or equal to max and you don't have month as dimension.

You can set month as dimension on table or change the expression to:

=(Avg({$<year = {$(=max(year))}, month = {"$(=max({<year={$(=max(year))}>} month))"}>} (STK_OPEN+STK_CLOSE)/2))

View solution in original post

2 Replies
rubenmarin

Hi paul, in table don't works because you're asking for month less or equal to max and you don't have month as dimension.

You can set month as dimension on table or change the expression to:

=(Avg({$<year = {$(=max(year))}, month = {"$(=max({<year={$(=max(year))}>} month))"}>} (STK_OPEN+STK_CLOSE)/2))

paulyeo11
Master
Master
Author

Hi Sir

Many thank. it work fine now.

Paul