Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
nareshthavidishetty
Creator III
Creator III

Merging inside field values

Hi,

In the below image i have to make eOriginal Error...status as Completed so to get that i use the below logic in chart.

Logic:  pick(match([BBR2TT],'Completed','Declined','eOriginal Error : no document found','sent','Voided','Failed'),'Completed','Declined','Completed','sent','Voided','Failed')

Count.png

Result after logic used: Not correct because eOriginal Error...status as Completed =7+7=14 but shows only '7'

Tried with script level logic too:if(BBR2TT='eOriginal Error : no document found','Completed',BBR2TT) as BBR2TT_Stat,

Untitled.png

Thnaks..

1 Solution

Accepted Solutions
sunny_talwar

This below is your dimension? right? I am looking for the expression you have used?

Chart expression:pick(match([BBR2TT],'Completed','Declined','eOriginal Error : no document found','sent','Voided','Failed'),'Completed','Declined','Completed','sent','Voided','Failed')

I have feeling that you might be just using count_based_on_mule_status whereas you might need to use Sum(count_based_on_mule_status) as your expression. In short you would need some aggregation around your expression

View solution in original post

4 Replies
sushil353
Master II
Master II

Try this at script level:

if(BBR2TT='eOriginal Error : no document found' or BBR2TT='Completed','Completed',BBR2TT) as BBR2TT_Stat

HTH

sunny_talwar

What is the expression you are using here?

nareshthavidishetty
Creator III
Creator III
Author

Hi,

Chart expression:pick(match([BBR2TT],'Completed','Declined','eOriginal Error : no document found','sent','Voided','Failed'),'Completed','Declined','Completed','sent','Voided','Failed')

Script:

[count_based_on_mule_status]:

LOAD *;

SELECT A.A7AACD ,B.BBR2TT  , COUNT(DISTINCT B.BBBANB) as count_based_on_mule_status

FROM DSA7CPP A , INBBCPP B WHERE A.A7BANB = B.BBBANB AND A.A7AIDT = $(vYesterday)

GROUP BY A.A7AACD,B.BBR2TT ;

Field=BBR2TT.

Thanks..

sunny_talwar

This below is your dimension? right? I am looking for the expression you have used?

Chart expression:pick(match([BBR2TT],'Completed','Declined','eOriginal Error : no document found','sent','Voided','Failed'),'Completed','Declined','Completed','sent','Voided','Failed')

I have feeling that you might be just using count_based_on_mule_status whereas you might need to use Sum(count_based_on_mule_status) as your expression. In short you would need some aggregation around your expression