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: 
Anonymous
Not applicable

Dynamically compare dimension values

Hi everyone. I'm trying to figure out how I should approach creating an object that allows the user to pick which records to compare in a table. For example let's say I have a table like this:

Our ProductsOur Sales
Competitor Products
Competitor SalesSales Difference
OP1100CP19010
OP250CP275-25
OP325CP3250

Here the differences are taken by OP1 - CP1, OP2 - CP2, and so on. What I want is for the user to be able to see the Sales Difference of OP1 - CP3 or OP2 - CP1, etc according to their designation of which products to compare against. I don't know if there's a way to have picklists or something and a table that recognizes those records as the ones to compare... Any suggestions on where to begin, what functions and object types to use, etc would be greatly appreciated!

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

In case anyone finds this, here's what I did:

Originally in my script, Our Products and Competitor Products existed in the same concatenated table from two sources, which is where my question originated from because I wasn't sure how to split 1 field into 2 columns in an object. What I had to do was keep those two sources separate, i.e. have two tables for both product categories with all uniquely named fields. For example instead of just Sales there is now OurSales and CompetitorSales. My table structure now looks like two separate structures with unique fields. Then I could build a chart that compares the two types of products (ours vs competitors).

In order for the user to pick what to compare without showing every possible combination of our products to competitor products, I decided to have the designations pull from a Google spreadsheet with two columns: Our Products and Competitor Products where my boss can choose what that table should default to. Then I created another table with a flag for those combos so that when the flag filter is activated in the app, the chart will reflect the pairings in the Google doc.

Best of luck to those attempting something similar!

View solution in original post

6 Replies
rupamjyotidas
Specialist
Specialist

use Alternate States

Alternate States ‒ QlikView

passionate
Specialist
Specialist

How many distinct Dimension value you have like now it's 3.

And also are they dynamic

Anonymous
Not applicable
Author

About 15 distinct dimension values for Our Products and 15 for Competitor Products, so 30 total. Not sure what you mean by dynamic, but the products are pretty much set with an occasional product being added once a month or so.

Anonymous
Not applicable
Author

I may be oversimplifying but maybe this?

Anonymous
Not applicable
Author

This is great! If I wanted each OP to be paired with only one CP and vice versa, do you know how I'd approach that? The table in your example returns each combination, but what if the user only wants to see one-to-one according to their selection, for example OP1 to CP2 and OP2 to CP3, but excluding all the other combinations of products.

Anonymous
Not applicable
Author

In case anyone finds this, here's what I did:

Originally in my script, Our Products and Competitor Products existed in the same concatenated table from two sources, which is where my question originated from because I wasn't sure how to split 1 field into 2 columns in an object. What I had to do was keep those two sources separate, i.e. have two tables for both product categories with all uniquely named fields. For example instead of just Sales there is now OurSales and CompetitorSales. My table structure now looks like two separate structures with unique fields. Then I could build a chart that compares the two types of products (ours vs competitors).

In order for the user to pick what to compare without showing every possible combination of our products to competitor products, I decided to have the designations pull from a Google spreadsheet with two columns: Our Products and Competitor Products where my boss can choose what that table should default to. Then I created another table with a flag for those combos so that when the flag filter is activated in the app, the chart will reflect the pairings in the Google doc.

Best of luck to those attempting something similar!