Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Combine Fields as Dimension

Let's say I have three fields: Country, Year and Sales

Here is my dataset

Key     Country     Year     Sales

1          USA          2014     200

2          USA          2013     400

3          UK            2007     500

4          UK            2008     900

5          UK            2009     400

I want to create a chart where I show country and year as a dimension and sum(sales) as expression. However, I want to provide the user to chose what country and year combinations they want to display in the chart. Example: user wants to only show Keys 1,3,5 in the above dataset.

First I tried creating a combine field called CountryYear in the load process and use the combined field as a dimension. However, I don't like the presentation part of it (list box with the joint field). Is there a way I can have two list boxes Country and Year and use the joint field as a dimension.

1 Solution

Accepted Solutions
MarcoWedel

You could use alternate states to select independent country/year combinations.

hope this helps

regards

Marco

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Yup.

Keep the Country and Year columns, and use in your 2 list boxes,

Add the new column of Country&Year combined, and use for you dimension

its_anandrjs

Hi,

You can use different list box also by changing settings

List properties >> Presentation >> Selection Style override (And select LED Check boxes)

List.png

Regards

Anand

Not applicable
Author

I want the selections to be based on country and year, do you think it is possible?

Anonymous
Not applicable
Author

Sure is possible.

Have you tried it ?

If you have tried it & it did not work, then what kind not working ?

Not applicable
Author

Lets say there is the year 2007 for both USA and UK, if the user wants to show 2007 for only USA and 2009 for UK..could that be done?

Not applicable
Author

Yes I tried it and your suggestion as well. If a year is selected and the year does not exist for a particular country, I am unable to add that country to the chart for a different year.

its_anandrjs

Yes you are right then in this condition due to association that country not selected because it is not exist for that years then it will not shown right. Or you can create the key as Bill suggest like

Country&Year as Key1

Key&Country&Year as Key2

Regards

Anand

MarcoWedel

You could use alternate states to select independent country/year combinations.

hope this helps

regards

Marco