Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Merging Rows

Hai i had two source fil. One is Excel and another is QVD. I had the values as follows.

Excel:                    

CategoryValue
A-B      6
C       4

QVD:

CategoryValue
A2
B5
C5

My Output should be as follows:

CategoryExcel ValueQVD Value
A-B67
C45

Need to make QVDs A and B value as A-B value and i need to get the above result. Could anyone answer me pls?

Labels (1)
1 Reply
MK_QSL
MVP
MVP

Use below script

===============

Excel:

Load

  Category,

  Value as Value1

Inline

[

  Category, Value

  A-B, 6

  C, 4

];

QVD:

Load

  If(Category='A','A-B',IF(Category='B','A-B',Category)) as Category,

  Value as Value2

Inline

[

  Category, Value

  A, 2

  B, 5

  C, 5

];

==========================

Now create a straight Table

Dimension = Category

Expressions

1) SUM(Value1)

2) SUM(Value2)