Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

use variable within set analysis

Hi.

  can anybody help me? )

MyFieldFromOtherTableSumFieldFromOtherTable
95100.00
96200.00
97300.00

MyFieldFromChartcalculation sum (((
95here must be 100
96here must be 200

This construction works in chart:    Sum({<MyFieldFromOtherTable={95}>} SumFieldFromOtherTable)  (in all row sum equal 100 )

This construction don't works in chart:    Sum({<MyFieldFromOtherTable={MyFieldFromChart}>} SumFieldFromOtherTable)




4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

It depends on how MyFieldFromChart is defined. you could try

Sum({<MyFieldFromOtherTable={'$(MyFieldFromChart)'}>} SumFieldFromOtherTable)

or

Sum({<MyFieldFromOtherTable={"$(=MyFieldFromChart)"}>} SumFieldFromOtherTable)

If these do not work, I suggest you post more detail about the variable and your data model. the best would be a small sample qvw/qvf file that illustrates the problem.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Sorry for the pause.

both variants don't work

(Sum({<MyFieldFromOtherTable={'$(MyFieldFromChart)'}>} SumFieldFromOtherTable)  and Sum({<MyFieldFromOtherTable={"$(=MyFieldFromChart)"}>} SumFieldFromOtherTable)

karthiksrqv
Partner - Creator II
Partner - Creator II

Hi Ihor,

In the sample you have provided, the 2 tables are not linked. You could link the 2 tables and then use a simple sum(SumFieldFromOtherTable).

"

table1:

Load * Inline [

MyFieldFromOtherTable,SumFieldFromOtherTable

95,100.00

96,200.00

97,300.00

];

table2:

Load * Inline [

MyFieldFromChart,MyFieldFromOtherTable

96,96

95,95

];

"

Anonymous
Not applicable
Author

Could of course. But I did not want to be through a link. It was other task.

I think "set analysis" can not cope.

Thank you all )))))