Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

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
Highlighted
Contributor III
Contributor III

Re: Dynamically compare dimension values

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
Highlighted
Specialist
Specialist

Re: Dynamically compare dimension values

use Alternate States

Alternate States ‒ QlikView

Highlighted
Specialist
Specialist

Re: Dynamically compare dimension values

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

And also are they dynamic

Highlighted
Contributor III
Contributor III

Re: Dynamically compare dimension values

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.

Highlighted
Specialist II
Specialist II

Re: Dynamically compare dimension values

I may be oversimplifying but maybe this?

Highlighted
Contributor III
Contributor III

Re: Dynamically compare dimension values

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.

Highlighted
Contributor III
Contributor III

Re: Dynamically compare dimension values

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