10 Replies Latest reply: Jun 22, 2012 11:28 PM by Nick Gan

# SET analysis with maxstring

Hi,

i'm doing a set analysis below, but i have a problem at &.

someone help??

FLAG_VAL = {'M-' & \$(='MaxString({\$<PROD={'ACTUAL'}>} SubField(FLAG,'-',2))') }

Thanks,

• ###### Re: SET analysis with maxstring

Hi,

Try with : FLAG_VAL = {'M-\$(=MaxString({\$<PROD={"ACTUAL"}>} SubField(FLAG,chr(65),2)))' }

Regards,

Vincent

• ###### Re: SET analysis with maxstring

hi two ideas :

1. change to

FLAG_VAL = {"\$(='M-' & MaxString({\$<PROD={'ACTUAL'}>} SubField(FLAG,'-',2))" }

2. create a variable with this expression:

vFilter = 'M-' & MaxString({\$<PROD={'ACTUAL'}>} SubField(FLAG,'-',2))

then in the set analysis write

FLAG_VAL = {"\$(vFilter)"}

• ###### Re: SET analysis with maxstring

Vincent, i tried that, it wont work either.

Liron, i tried both methods.. not working too...

• ###### Re: SET analysis with maxstring

can you post a sample data

• ###### Re: SET analysis with maxstring

it's quite difficult...for the data...

the set analysis is part of a bigger formula,

• ###### Re: SET analysis with maxstring

I've done a mistake in my formula, perhaps have you corrected it ? It's not chr(65) but chr(45).

Regards,

Vincent

• ###### Re: SET analysis with maxstring

Vincent,

I tried, 45, but still the same, it's showing 0, at least that's digit.

i also tried to put the doublt qoute around it "chr(45)", it's still the same.

we should be close....

• ###### Re: SET analysis with maxstring

ok, i'm changing the way of calculation.

right now, the set analysis is working in the qvw in attached.

but, there's a need to always select a month, else it wont show any data.

how can i make is show the data without selecting the months?

when the tabel is right, there will only be 2 data for march and april, the rest should be empty.

table on top is just displaying the data for checking. table below is what i'm working on...

hope someone has some solution... thanks

• ###### Re: SET analysis with maxstring

Hi,

I doesn't work because \$(=Maxstring(PROD_PLAN_FLAG_REF)) is not executed in the context of your chart but globaly. It means that with no selected month, it does not take in account the current dimension value.

So it returns for each lines M-4 which is only available in january.

Regards,

Vincent

• ###### Re: SET analysis with maxstring

thanks vincent... in the end, i changed the data structure... otherwise i guess i wont have solution to it.

Thanks for everyone's help. have a nice weekends.