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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

List with concat as modifier

Hi all

I am trying to produce a list of names with the following function:

concat({<Order_Channel_Name={"=sum({1<[Transaction_Date.autoCalendar.Year]={""$(vLY)""}, [Transaction_Date.autoCalendar.Month]={""$(vMonth)""}>}Value-Tax)>0"}>}distinct Order_Channel_Name, ',')

This actually works and returns a comma separated list of values (Order_channel_name)

Now I want to put these values in the following function:

sum({<Accumulator_Type={'RETAIL'},Order_Channel_Name={---Put above function here!!!}>}Value-Tax)

Apparently copying the first function and pasting it into the second doesn't work.

Any ideas?

1 Solution

Accepted Solutions
Anil_Babu_Samineni

My bad, Here it is?

sum({<Accumulator_Type={'RETAIL'},Order_Channel_Name={$(=Chr(39) & concat({<Order_Channel_Name={"=sum({1<[Transaction_Date.autoCalendar.Year]={""$(vLY)""}, [Transaction_Date.autoCalendar.Month]={""$(vMonth)""}>}Value-Tax)>0"}>}distinct Order_Channel_Name, Chr(39) & ',' & Chr(39)))}>}Value-Tax)


None of them won't help, I may ask sample application

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

4 Replies
Anil_Babu_Samineni

Perhaps this?

sum({<Accumulator_Type={'RETAIL'},Order_Channel_Name={$(=Chr(39) & concat({<Order_Channel_Name={"=sum({1<[Transaction_Date.autoCalendar.Year]={""$(vLY)""}, [Transaction_Date.autoCalendar.Month]={""$(vMonth)""}>}Value-Tax)>0"}>}distinct Order_Channel_Name, ',') & Chr(39))}>}Value-Tax)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

I see what you are doing with Chr(39). But putting it in the beginning and the end is not enough, it needs to be around each word that is concatenated. I tried the separator to be 'Chr(39),Chr(39)' but it doesn't work. It just adds the actual string "Chr(39)" before and after the comma.

Any other ideas?

Anil_Babu_Samineni

My bad, Here it is?

sum({<Accumulator_Type={'RETAIL'},Order_Channel_Name={$(=Chr(39) & concat({<Order_Channel_Name={"=sum({1<[Transaction_Date.autoCalendar.Year]={""$(vLY)""}, [Transaction_Date.autoCalendar.Month]={""$(vMonth)""}>}Value-Tax)>0"}>}distinct Order_Channel_Name, Chr(39) & ',' & Chr(39)))}>}Value-Tax)


None of them won't help, I may ask sample application

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
teempi
Partner - Creator II
Partner - Creator II

Hi,

Maybe like this:

sum( {<Accumulator_Type={'RETAIL'}, Order_Channel_Name={"=sum({1<[Transaction_Date.autoCalendar.Year]={""$(vLY)""}, [Transaction_Date.autoCalendar.Month]={""$(vMonth)""}>} Value-Tax) > 0"} >} Value-Tax)

-Teemu