Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Join two crosstab table

Hello Everyone,

I have two crosstab tables need join together.

Headcount2012 Table:

Div
month1month2month3month4month5month6month7month8month9month10month11month12
div1234643226821
div2134667812345
div3246732156732
div4123454356214

Headcount2011 Table:

Div
month1
month2month3
month4month5month6month7month8month9month10month11month12
div1123546891235
div2235647321562
div3134568235676
div4246789124567
div5456636481234

in 2012 has one division removed. I need to add them to dashboard and 2012 shows 4 divisions and 2013 shows 5 division.

Can anyone help me create a join strategy?

Thanks in advance,

Dust

3 Replies
Gysbert_Wassenaar

I'd concatenate the two tables instead of joining them. Something like:

Data:

crosstable(Month,Value,2)

load  2012 as Year, * from ...headcount2012table...;

concatenate

crosstable(Month,Value,2)

load 2011 as Year, * from ...headcount2011table...;

You'll end up with a table named Data with four fields: Div, Month, Value and Year. You can then create charts as needed. See for example the two pivot charts in the attached example.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Hi Dust,

    Can you Please give some clatrification,

Current year only you needed  five divison and Previous all year's you need 4 divison.

Thanks


Not applicable
Author

Thank you for your helpful answer, Gybert.

For the new year 2013, we have some division removed from our system. When I load those data like you did, The division grey out since we don't have data for those removed division current year.

My dashboard need to show prior year such as 5 division and current year 4 division. It may need some bridge table to join those tables.

Best regards,

Dust