Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I have a bar chart for which I have 4 dimensions and 4 expressions. Lets give them random names before I start describing my problem (screen shots have the real names I have used)
Dimensions Expressions
DimA ExpA
DimB ExpB
DimC ExpC
DimD ExpD
Note: Dimensions are cyclic grouped and Expressions are also cyclic grouped (Please see attached screen shots)
DimA - formula used is =Aggr(DISTINCT ROUND(DimA, .1), DimA)
ExpA - formula used is =Count(ROUND(DimA, .1))
The same formula applies to all other dimensions and expressions (Only the dimension and expression names change in the formula).
Apparently, currently the users when they select ExpA then they must select DimA to see the correct results in the graph. Similary if they select ExpB then DimB must be selected to see the correct results.
This is a bit annoying sometimes and I wanted to know if there is a way by which I can achieve the following
1. Whenver user selects an ExpA automatically DimA must be selected.
2. Above must apply to all other expressions.
3. Show only the result of one selected expression (with one dimension) at a time.
Is this doable in any way?
Thanks,
Ranjith
Hi
Check the attached file..
Hi Ranjith,
By using GetCurrentField(), we can get the selected dimension in a Group. By getting the dimension, using If() in expression you can achieve this in a single expression like below
=If(GetCurrentField(GroupName) = 'Dimension1', Expression1,
if(GetCurrentField(GroupName) = 'Dimension2', Expression2,
if(GetCurrentField(GroupName) = 'Dimension3', Expression3, Expression4)))
Hope this helps you.
Now you don't need four expression, single dynamic expression serves your purpose.
Regards,
Jagan.
Hi Jagan,
Thanks for the response but I'm afraid this will not work for me. The reason being GetCurrentField() only works if the group contains fields whereas mine consists of formula's (please check my first post above).
RC
Hi Ranjith,
What version of QV do you use?
If you use QV 11 you can easily do this by enabling the condition.
Thanks,
Srini.
I use QV11. Can you please attach an example of how to do this in my case please where the dimensions and expressions are groups and then each field is a calculated one?
Hi Ranjith,
Provide me a sample document with sample data.
Thanks,
Srini.
Attached.
Ppl,
Any answers? Is there a way possible?
Hi
Check the attached file..
Great. Thanks MV. That solved it.