Skip to main content
Announcements
Qlik Acquires Upsolver to Advance Iceberg Solutions: READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
danielrogra
Creator
Creator

Create dimension from two dimensions

Hi All

I have two dimensions as follows:

Dimension1Dimension2
AA.1
AA.2
BB.1
BB.2

and I want to create the following dimensions

New dimensionsTotal
Asum where dimensions2 in (A.1,A.2)
Bsum where dimensions2 in (B.1,B.2)
Csum where dimensions2 in (A.2,B.2)

How can I create that?

Thanks in advance

Regards

11 Replies
joseph_eftamand
Partner - Creator
Partner - Creator

Hi Daniel,

Sorry, I'm not sure I understand, can you explain your question again? You're just creating a new dimension and assigning the text strings 'A','B','C' to different combinations of dimension2.

Perhaps I have misunderstood your requirement.

Joseph

juraj_misina
Luminary Alumni
Luminary Alumni

Variation of Nagesh's suggestion:

  1. DataWithNewDimension:
  2. LOAD 
  3.     Dimension1,
  4.     Dimension2
  5. FROM [lib://mylink] 
  6. (html, utf8, embedded labels, table is @1); 
  7. Left Join
  8. Load * Inline [ 
  9. Dimension2, NewDimension1
  10. A.1, A
  11. A.2, A
  12. A.2, C
  13. B.1, B
  14. B.2, B
  15. B.2, C
  16. ];