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

Ciclic Group From Expression

Hi I have a Ciclic Group with 3 values as a Dimension in a Graph, the question is: How can I make to get the current value from the expression. I mean

IF( CICLICGROUP='ValueA', SUM(AmountA), IF(CICLICGROUP='ValueB', SUM(AmountB), SUM(AmountC)))

Thanks in advance.

1 Solution

Accepted Solutions
Sokkorn
Master
Master

Hi Pedro,

Let do this

IF(WildMatch(GetCurrentField(MadEnv),'*Amount*'),Sum(Amount),

IF(WildMatch(GetCurrentField(MadEnv),'*Kilos*'),Sum(Kilos),Sum(Amount)/Sum(Kilos)))

Let me know with this expression.

Regards,

Sokkorn

View solution in original post

6 Replies
Sokkorn
Master
Master

Hi Pedro,

I thinks GetCurrentField(GroupName) will do this.

IF(GetCurrentField(GroupName)='ValueA', SUM(AmountA), IF(GetCurrentField(GroupName)='ValueB', SUM(AmountB), SUM(AmountC)))

Please ignore formular checker.

Do let me know if this one help you.

Regards,

Sokkorn

Not applicable
Author

Hi Sokkorn, thanks for your time, I can`t make it work. I don't know why. My Cyclical Group "MadEnv" has 3 posibles values. They are not "real" fields but text Expressions edited while the group was created. Like a list. The values are "Amount", "Kilos" and "UnitPrice".

Captura.JPG

Captura.JPG

Captura.JPG

So the expression should be

IF(GetCurrentField(MadEnv)='Amount',Sum(Amount),

IF(GetCurrentField(MadEnv)='Kilos',Sum(Kilos),Sum(Amount)/Sum(Kilos)))

But It doesn't work. I'm doing something wrong for sure...

Not applicable
Author

What did you mean with "Please ignore formular checker"

Sokkorn
Master
Master

Hi Pedro,

When you apply GetCurrentField(MadEnv) then you will see the red line highlight this epression (normaly it mean wrong expression).

By the way, can you share your app? We look into it together to find solution.

Regards,

Sokkorn

Sokkorn
Master
Master

Hi Pedro,

Let do this

IF(WildMatch(GetCurrentField(MadEnv),'*Amount*'),Sum(Amount),

IF(WildMatch(GetCurrentField(MadEnv),'*Kilos*'),Sum(Kilos),Sum(Amount)/Sum(Kilos)))

Let me know with this expression.

Regards,

Sokkorn

Not applicable
Author

Yeah, the last one worked!! Thank you very much!!