Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Ceb
Contributor III
Contributor III

Working with 2 Dimensions and 2 measures(Combo Chart)

Hi,

 

I have the below dataset

ProductGroupActualTarget
ApplesB0.350.47
ApplesA0.870.7
ApplesC0.610.67
OnionsB0.400.4
OnionsA0.870.7
OnionsC0.710.64
BananasB0.300.44
BananasA0.690.7
BananasC0.620.65
TomatoesB0.530.47
TomatoesA0.940.7
TomatoesC0.580.67

 

I am trying to compare the actual value of multiple groups of the product with the Target but I am not able to do it.

I can get this by using a bar chart but cannot add targets

clipboard_image_1.png

 

If I want to add targets then I need to do something like this 3 times(for 3 different groups)

clipboard_image_3.png

Is there a way where I can implement the target and the actual values with the group something like this

clipboard_image_4.png

 

Thanks

Labels (3)
1 Solution

Accepted Solutions
Ceb
Contributor III
Contributor III
Author

Thanks Jkfong93!!

 

That is one way to go about it. But the problem is if there are many products it could get complicated writing all of it.

 

I did it using tabs. Creating 3 tabs for the 3 Groups and plotted the target and actual values

 

 

View solution in original post

2 Replies
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

Try this:

clipboard_image_0.png

 

This workaround is done by using Valuelist and inserting all dimension values into it:

Create the dimension using Valuelist:

=valuelist('Apple A','Apple C','Apple B','Bananas A','Bananas C','Bananas B','Onions A','Onions C','Onions B','Tomatoes A','Tomatoes C','Tomatoes B')

Then in expression, pick and match each value assigned using set analysis:

For Actual:

pick(match(valuelist('Apple A','Apple C','Apple B','Bananas A','Bananas C','Bananas B','Onions A','Onions C','Onions B','Tomatoes A','Tomatoes C','Tomatoes B')
,'Apple A','Apple C','Apple B','Bananas A','Bananas C','Bananas B','Onions A','Onions C','Onions B','Tomatoes A','Tomatoes C','Tomatoes B'),
avg({<Product={'Apples'},Group={'A'}>}Actual),
avg({<Product={'Apples'},Group={'C'}>}Actual),
avg({<Product={'Apples'},Group={'B'}>}Actual),
avg({<Product={'Bananas'},Group={'A'}>}Actual),
avg({<Product={'Bananas'},Group={'C'}>}Actual),
avg({<Product={'Bananas'},Group={'B'}>}Actual),
avg({<Product={'Onions'},Group={'A'}>}Actual),
avg({<Product={'Onions'},Group={'C'}>}Actual),
avg({<Product={'Onions'},Group={'B'}>}Actual),
avg({<Product={'Tomatoes'},Group={'A'}>}Actual),
avg({<Product={'Tomatoes'},Group={'C'}>}Actual),
avg({<Product={'Tomatoes'},Group={'B'}>}Actual)
)

For Target:

Change the measurement field to Target.

 

Refer qvf attached for reference.

Thanks and regards,

Arthur Fong

 

Ceb
Contributor III
Contributor III
Author

Thanks Jkfong93!!

 

That is one way to go about it. But the problem is if there are many products it could get complicated writing all of it.

 

I did it using tabs. Creating 3 tabs for the 3 Groups and plotted the target and actual values