Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Change dimension based on selected expression

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

1 Solution

Accepted Solutions
Highlighted

Hi

Check the attached file..

Thanks & Regards,
Mayil Vahanan R

View solution in original post

12 Replies
Highlighted
MVP & Luminary
MVP & Luminary

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.

   

Highlighted
Not applicable

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

Highlighted
Not applicable

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.

Highlighted
Not applicable

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?

Highlighted
Not applicable

Hi Ranjith,

Provide me a sample document with sample data.

Thanks,

Srini.

Highlighted
Not applicable

Attached.

Highlighted
Not applicable

Ppl,

Any answers? Is there a way possible?

Highlighted

Hi

Check the attached file..

Thanks & Regards,
Mayil Vahanan R

View solution in original post

Highlighted
Not applicable

Great. Thanks MV. That solved it.