Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

How to write different expression for two fields in a cyclic group

Hi Guys,

I have to write two separate expression for two fields in a cyclic group. So, for example, I have a cyclic group called GeoGroup which has two fields i.e, Region and Country. Now I have to use it in a bar chart but i want to make small change in my main expression based on the field the user selects in the chart. So, if the user selects Region, Exp_1 should be executed and if he/she selects Country field then the Exp_2 should get executed.

I tried implementing this using GetCurrentFields(GeoGroup) function but it doesn't work for some reason.

Any suggestion or a tip would be great as I need to get this done quickly.

Thanks,

Pranav

Labels (3)
1 Reply
Vegar
MVP
MVP

Are you utsikt correct spelling for GetCurrentField(GeoGroup) ? It's not GetCurrentFields(GeoGroup) .

The pseudo expression below should work.

If(GetCurrentField(GeoGroup) = 'Country',
Sum(Countrymeasure1),
Sum(Othermeasure)
)