Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rodri_morales
Creator II
Creator II

Change Dimension

I have a doubt, can I use a Combo Box to change de dimension of a bar chart? Can anyone explain me how to do it?

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

- In your script:

load * inline [Dimension,DimLabel

AreaName, Area

ProblemName, Type

];

- Reload

- Make a new sheet object-->MultiBox --->Add field DimLabel

- Now choose between two options:

     1 Two graphs, on the layout tab mark show conditional and put DimLabel='Area' for the area chart on the other DimLabel='Type'

   

     2 One graph, in the dimension put [$(=Dimension)]

-Now when you select a value in the MultiBox the correct chart will show

View solution in original post

18 Replies
stigchel
Partner - Master
Partner - Master

Sure, load the exact names of the dimension fields into a new field e.g. "Dimension", add that field to the combo box and in the dimension of the bar chart put [$(=Dimension)]

Also a good idea to set the always one selected value option for the field "Dimension"

stigchel
Partner - Master
Partner - Master

Also if you need other labels than the field names use an extra field e.g. "DimLabel" Example:

load * inline [Dimension,DimLabel

Field1, Label1

Field2, Label2

....

];

rodri_morales
Creator II
Creator II
Author

The dimension are calculated, eg: EsCanje=0 or EsCanje=1... it's posible to do it? Where is the typ Combo Box?

stigchel
Partner - Master
Partner - Master

You probably want a MultiBox with one field and yes you can also put an expression in the "Dimension" field and use DimLabel to put in this MultiBox to let the user choose the calculated dimension.

rodri_morales
Creator II
Creator II
Author

Sorry, I cant understand you.. I try to explain my problem:

I have 2 charts: Area Problema (dimension: AreaName, show the amount of problems for each area) and Type Problema (dimension: ProblemName, show the amount of problem for each type). I want to do a ComboBox so I can select "Area" or "Type" and the chart change.

Can you explain me how to load it?

Not applicable

Hi,

You can use input box as  a combo box

right click in the sheet->New Sheet Object->Input box-> Add the variable->Go to Constraints->Select predefined values only->Give the list of values as Area;Type;->Use this variable in your chart dimension and in expression add the conditional that to show the chart

If you can't achive this pls post your sample file

stigchel
Partner - Master
Partner - Master

- In your script:

load * inline [Dimension,DimLabel

AreaName, Area

ProblemName, Type

];

- Reload

- Make a new sheet object-->MultiBox --->Add field DimLabel

- Now choose between two options:

     1 Two graphs, on the layout tab mark show conditional and put DimLabel='Area' for the area chart on the other DimLabel='Type'

   

     2 One graph, in the dimension put [$(=Dimension)]

-Now when you select a value in the MultiBox the correct chart will show

rodri_morales
Creator II
Creator II
Author

When I add:

LOAD * inline [Dimension,DimLabel

AreaName, Area

ProblemName, Type

];

the script show me a problema with AreaName.. AreaName and ProblemName are load first.. how I explain you.. I load different values, then I try to add the declaration you told me, but when I do it, it show me an errorproblema.png

Here is the part of the script:

LOAD     DetalleProblema,

        RazonSocial_Empresa,

        DetalleArea,

        Operacion,

        Estado,

        UsuarioResolvio,

        FechaResolucion,

        * inline [Dimension, DimLabel

        DetalleProblema, TipoProblema

        RazonSocial_Empresa, Empresa];

matthieu_burel
Luminary Alumni
Luminary Alumni

You can do it as explain before...

Why not using a cyclic group ?