Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
bharathkamath28
Contributor III
Contributor III

Combining Two Dimension into One in Combo Chart Qliksense

Hi All/@tresesco  @sunny_talwar 

I need your help on one of our scenario.

I have to combine two dimension into one in x axis.

Year and New Year.

bharathkamath28_0-1601446887899.png

If the user selects ID =1, then the output should be 

bharathkamath28_1-1601448155537.png

 

How to achieve this scenario. Please help me on this.

I have attached the sample app. Please have a look.

 

Thanks

 

 

Labels (1)
15 Replies
bharathkamath28
Contributor III
Contributor III
Author

@sunny_talwar 

Thanks for providing the solution.

This solution works perfect for my sample data sets. But same logic doesn't work with my original Qlik app😑.

Because in my data model, dates are duplicate. Distinct condition will not work for my case.

Is it possible to achieve this through link table

sunny_talwar

@bharathkamath28  Link table is going to take you back to the ideas provided by @tresesco and @Vegar . You don't want to use those, but okay with a link table?

bharathkamath28
Contributor III
Contributor III
Author

@sunny_talwar I am go via Link Table to achieve this scenario.

sunny_talwar

@bharathkamath28  are you saying you want to achieve this using Link table?

bharathkamath28
Contributor III
Contributor III
Author

Yes @sunny_talwar  achieve this through Link table

sunny_talwar

@bharathkamath28 There might be a better LinkID you can create, but based on the data provided... try this

Base1:
LOAD RowNo() as LinkID,
	 *;
load * inline [
ID,Value,Year
1,10,2020
2,15,2021];

B:
LOAD RowNo() as LinkID,
	 *;
Load * inline [
ID,ID2,Bal,NewYear
1,1.1,25,2020
1,1.2,30,2021
1,1.3,40,2022
2,2.1,50,2020
2,2.2,60,2024
2,2.3,70,2025];

LinkTable:
LOAD DISTINCT Year as LinkYear,
	 LinkID,
     ID,
     'Base1' as Table
Resident Base1;

Concatenate (LinkTable)
LOAD DISTINCT NewYear as LinkYear,
	 LinkID,
     ID,
     'B' as Table
Resident B;

DROP Field ID from Base1;
DROP Field ID from B;