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

Problem combining AGGR and Set analyses. Always want to compare to same thing

HI,

I'm having problems with building a formula. This picture shows it best.

case.png

The CALC1 field should Always be the total of the productgroup: baseset.

I've succeeded with doing that with for the first part with the formula
SUM(TOTAL <[PRODUCTGROUP]> AMOUNT)

Unfortunately I can't get it to work when the table hits the productgroup "Sales".

See the picture.

SUM(TOTAL <[PRODUCTGROUP]> {<PRODUCTGROUP={'BASESET'}>}AMOUNT) doesn't do the trick.

I've included a .qvw file with script and GUI. Can anyone help? Thanks!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use a helper variable. For example vTotal_BASESET: =sum({<PRODUCTGROUP={'BASESET'}>}AMOUNT)

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

4 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

Use CALC1 formula as

$(=SUM( {<PRODUCTGROUP={'BASESET'}>} AMOUNT) )

Gysbert_Wassenaar

Use a helper variable. For example vTotal_BASESET: =sum({<PRODUCTGROUP={'BASESET'}>}AMOUNT)

See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks! That solves it!

I'm absolutely surprised to see that the formula does not work when coded into the expression, but that it does work when using a variable.

Thanks!

case2.png

Not applicable
Author

oh wow. It seems I got 2 correct answers!

Thanks for this one too.