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

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,

10 Replies
vincent_ardiet
Specialist
Specialist

Hi,

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

Regards,

Vincent

lironbaram
Partner - Master III
Partner - Master III

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)"}

Not applicable
Author

Vincent, i tried that, it wont work either.

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

lironbaram
Partner - Master III
Partner - Master III

can you post a sample data

Not applicable
Author

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

the set analysis is part of a bigger formula,

vincent_ardiet
Specialist
Specialist

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

Regards,

Vincent

Not applicable
Author

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....

Not applicable
Author

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

vincent_ardiet
Specialist
Specialist

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