I assume that your cycle groups are not identical, otherwise you can use only one in both charts.
Assuming that the group 1 has fields A,B,C - use it in Cycle in the 1st chart.
In the second chart, use calculated dimension, something like
=if(GetCurrentField('cycleGroupName1') = 'A', X, if(...)))
No triggers/macros/actions needed.
(I didn't try, but expect this approach to work.)
Thank you for your quick answer, but it didn't give me the expected results.
As you said, I used a calculated dimension:
- "Bedarfszielgruppe" and "Stat.Zielgruppe" are both dimensions
- my cycle group is called "Größenklasse" and has two values "Bedarfsgrößenklasse" and "Stat.Größenklasse". If "Bedarfsgrößenklasse" is chosen, i'd like to change my calculated dimension to "Bedarfszielgruppe" else i'd like to change it to "Stat.Zielgruppe".
=if(GetCurrentField('Größenklasse') = 'Bedarfsgrößenklasse', Bedarfszielgruppe, (If(GetCurrentField('Größenklasse') = 'Stat.Größenklasse', Stat.Zielgruppe)))
As formula i used "count(distinct customerID)"
Perhaps you have another solution to solve my problem.
Thanks a lot!
So what do you get returned from your calculated dimension?
Please check that GetCurrentField() returns the current field of your group, I am always confused with the mixed-up requirement to pass a string or a field / group name in QV, but I believe you should remove the single quotes within the GetCurrentField() function.
=if(GetCurrentField( Größenklasse ) = 'Bedarfsgrößenklasse', Bedarfszielgruppe,
(If(GetCurrentField( Größenklasse ) = 'Stat.Größenklasse', Stat.Zielgruppe)))
Is it absolutely necessary to use Cycle group? If not, it is easier to use a variable with pre-defined values, and make dimension calculated in both charts, and depend on the same variable.
See attached. I'm sure it can be done in a more elegant way, this is just a quick demo.
SyncCycle.qvw 133.2 K