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: 
Anonymous
Not applicable

Merging different results into one based on different conditions

Hi All,

I have data as shown in below. Could some one suggest me to build stack barchart,  how to get Derive Line Name  and show sum() as shown in result set.

First three columns available in script. How to derive line name as Dimension? Sum of result set shown in last.

    

Line NameFamily NameQuantityDerive Line Name
A SalesZ100A
A SalesO90A
A SalesS70A
A SalesBF70A
A SalesE60A
A Sales OSE40A
A Sales OSS70A
A Sales OSZ70A
A Sales OSBF60A
A Stock SalesZ90A
A Stock SalesS70A
A Stock Sales OSS70A
NONEO60exclude in Chart
NONETREATMT40exclude in Chart
NONEGLAZING100exclude in Chart
NONETINT90T
NONECOAT70exclude in Chart
B SalesZ70B
B SalesBF60B
B SalesS40B
B SalesE70B
B Sales OSBF60B
C SalesBF40C
C SalesS100C
C SalesZ90C
C SalesE70C
C Sales OSS40C
C Sales OSBF70C
C Stock SalesZ70C

C Stock Sales

S60C
C Stock Sales OSS90C

Result set with expression:

  

Derived Line NameQuanity
Asum(A) - Sum(T)
TSum(T)
BSum(B)
CSum(C)

Please suggest me, is it possible to do with out touching script and just with Dimensions and Expressions?

Thanks to suggest.

Regards,

Krishna

14 Replies
Anonymous
Not applicable
Author

Hi Kushal,

In the sample application quantity is part of same dimension. but in my application quantity is coming from facts table and line name , family name are part of product table. Line code is key column between two tables. In this case i am unable to group line name for A,B,C and for line name T it is combination of T and family name. Please suggest me considering quantity is in another table. Even in my sample data i mentioned both as different tables.

Thankyou.

Kushal_Chawda

Can you join both the tables? If you can join both the table on DateKey and Line Code ,you can follow my approach

Anonymous
Not applicable
Author

Not possible Kushal. We can not join Facts and dimensions.

Kushal_Chawda

Any specific reason?

Anonymous
Not applicable
Author

There are many other dimensions connected to facts and Management does not accept to merge. Strictly they oppose script level changes.