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: 
Meyers
Contributor II
Contributor II

Creation of 2 different charts based on selections in filter pane and Percetange of total

Dear friends,

I have 2 doubts

Doubt 1: My table has the said fields (Country, Category, Volume, Month, Year, SalesValue) in my table. In Category tab i have two values (Beverages and Snacks).

1) I have created the filter pane with Dimensions as category. Is there a way to create two different types of charts for two different values and link it to filter pane

          i)When i select Beverages, the chart should display a table (Sales Value based on country from Jan to Dec)

          ii) When I select Snacks, the chart should display bar chart (Total volume from Jan to Dec)

Is there a way to link all 3 of the above?

Doubt 2: I am trying to create a pivot table of Percentage of total sales value for all the countries from Jan to Dec. Have used Sum (Value)/ Sum (TOTAL Value). However this is not giving the desired result.

Request for your support on the above 2 problems. Thanks.

Labels (2)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

For #1, you will want to create your Beverages tables and your Snacks barchart and put both in the same container object. In the container object,
select the Beverages table and in the "Show Condition" expression, use the following
if(GetFieldSelections(Category)='Beverages',1,0)

For the "Show Condition" of the bar chart, use the following:
if(GetFieldSelections(Category='Snacks',1,0)

It is unclear when you say Jan to Dec, if you are wanting monthly data for a selected year? Are you using a Year filter?

#2
I'm not sure of the exact behavior/results you are look for, bu if you have Country and Month as your dimensions, you may want to use:
sum(Value) / Sum(Total <Country,Month> Value)

View solution in original post

4 Replies
GaryGiles
Specialist
Specialist

For #1, you will want to create your Beverages tables and your Snacks barchart and put both in the same container object. In the container object,
select the Beverages table and in the "Show Condition" expression, use the following
if(GetFieldSelections(Category)='Beverages',1,0)

For the "Show Condition" of the bar chart, use the following:
if(GetFieldSelections(Category='Snacks',1,0)

It is unclear when you say Jan to Dec, if you are wanting monthly data for a selected year? Are you using a Year filter?

#2
I'm not sure of the exact behavior/results you are look for, bu if you have Country and Month as your dimensions, you may want to use:
sum(Value) / Sum(Total <Country,Month> Value)

Anil_Babu_Samineni

Try this Way 

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Meyers
Contributor II
Contributor II
Author

Thank you very much for your response @GaryGiles. That worked for me. However for the second problem the solution that I needed was sum(Value) / Sum(Total <Country> Value). This expression gave the desired result.

Meyers
Contributor II
Contributor II
Author

Thanks for your response @Anil_Babu_Samineni