Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic dimension order by fast change chart type.

Hi,

I have a Line Chart that has a fast change option for Pivot Table. However, when I switch to Pivot table, the data is not showing in the order I want it to.

i.e. For the Line chart I need the dimension order to be Time, [Product Brand] versus [Product Brand], Time for the Pivot Table.

Additionally, upon switching to the Pivot table, I need to add a second expression. The Line Chart is showing the expression Market Share, but when I switch to the Pivot Table, I need it to show both Market Share: Sum(Units)/Sum(Total<Time>Units) AND Total Units: Sum(Units).

How do you reference an Object, Chart Type, and the chart's Dimension Position in QlikView? For Example, something like:

If the chart object is a Line Chart then move the dimension Time to position 1, else move to position 2.

=if(Object('CH01') = 'Line Chart', DimPosition(Dimension(Time), 1), DimPosition(Dimension(Time), 2))

Where would I write that condition? Under the chart's General tab in "Calculated Condition"?

Finally, can I dynamically add a second expression based on the chart type as mentioned about?

Thanks for any help!

5 Replies
maxgro
MVP
MVP

workaround: use a single object container with 2 charts (line, pivot)

Not applicable
Author


Thanks for the response Massimo!

My charts are already in a container. I have 5 charts in one container: Market Share by Year, Market Share by Quarter, 12 Month Rolling Share, 6 Month Rolling Share, and 3 Month Rolling Share.

I need it so that when the user is viewing a chart in the container, "Market Share by Year" for example, they can switch it to a pivot table and see the underlying data (Market Share and Sales). It would be preferable not to manage more charts and have the pivot table as a part of the chart they are currently viewing.

As a last resort I have considering creating a second container that has pivot table versions of the 5 respective line charts mentioned above. Although, I don't want to risk the user viewing the line chart "Market Share by Quarter," while forgetting to switch to the corresponding pivot table in the second container and misinterpreting the data.

EDIT -- One possible alternative solution is to have two containers, but have the containers linked. Where when you select Chart 1 in Container 1, it also selects Pivot 1 in Container 2. Is that possible?

Container 1 (Line Chart): Market Share by Year (Chart 1), Market Share by Quarter (Chart 2), 12 Month Rolling Share (Chart 3), 6 Month Rolling Share (Chart 4), and 3 Month Rolling Share (Chart 5).

Container 2 (Pivot Table): Market Share by Year (Pivot 1), Market Share by Quarter (Pivot 2), 12 Month Rolling Share (Pivot 3), 6 Month Rolling Share (Pivot 4), and 3 Month Rolling Share (Pivot 5).

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You could put chart1/pivot1 in a container and nest that in the main container. And so on for the rest of the pairs.

Unfortunately, I don't know of any indicator that you can test to find out which chart type you've fast changed to. That would be a useful feature because then you could disable/enable Dimensions and Expressions.

-Rob

Not applicable
Author

Hi Rob, thanks for the reply.

Can you explain nesting to me? I just recently started using QlikView and I am not familiar with the term.

Thanks!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

By nesting I meant put a container inside a container.

-Rob