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

How to make my target chart ok when not select current month and yr ?

Hi All

chart 1 expression work fine when select current month and year :-

sum({$<year = {$(=max(year)-0)}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>}sales_target/$(Columndim89)/1000)

, $(vMoneyFormatK))

Table 1 expression work fine when not select month and year :-

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales_target/$(Columndim89)/1000)

, $(vMoneyFormatK))

In order to make chart 2 don't need to select current month and year , i use Table 1 expression for chart 2 expression :-

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales_target/$(Columndim89)/1000)

, $(vMoneyFormatK))

I expect Chart 2 to display the bar value same as Table 1. But it does not work. Hope some one can help me.

Paul

1 Solution

Accepted Solutions
jepeerik
Contributor III
Contributor III

I tested your Set Analysis Expressions and by adding them to a new Straight Table without any Labels I can see what the values of the variables within an expression and Set  Analysis are. So then I discoverd that the Set Analysis within your table constantly showing the current month disregarding the selection, and the graph was changing the value of Month from the current Month (with selection) to Month 12 (without Selection).

Both expressions have a different Set Analysis, so if you make the expression of the graph equal to the expression of the table, it will show the correct amount (115K), wether you have a selection or not.

I the attachment you'll find your edited QVW. You'll also find the straight tables with no lables, so you can investigate the values of the variables in the popup of the column headers.

Will this answer help you?

Sharing knowledge increases your knowledge

View solution in original post

3 Replies
jepeerik
Contributor III
Contributor III

I tested your Set Analysis Expressions and by adding them to a new Straight Table without any Labels I can see what the values of the variables within an expression and Set  Analysis are. So then I discoverd that the Set Analysis within your table constantly showing the current month disregarding the selection, and the graph was changing the value of Month from the current Month (with selection) to Month 12 (without Selection).

Both expressions have a different Set Analysis, so if you make the expression of the graph equal to the expression of the table, it will show the correct amount (115K), wether you have a selection or not.

I the attachment you'll find your edited QVW. You'll also find the straight tables with no lables, so you can investigate the values of the variables in the popup of the column headers.

Will this answer help you?

Sharing knowledge increases your knowledge
swuehl
MVP
MVP

I think your expression misses a leading Money(

to replicate table1 expression:


=

money(

Sum({$<year = {$(=Max(year)-0)}, month = {"<=$(=Max({<year={$(=Max(year))}, sales = {'*'}>} month))"}>}sales_target/$(Columndim89)/1000)

, $(vMoneyFormatK))

paulyeo11
Master
Master
Author

Hi Stefan

Yes you are right , i just discover when i download the file attach from Jorgen. Many thank for high lighted to me. sorry i am too careless.

Paul