Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have table where campaign_id is a field which has many values, each week campaigns are created on client and batch specific.
For ex: batch_id = 1 has 4 campaigns and batch_id = 2 has 3 campaigns every week.
I need sum of user completed on batch specific. for ex:
Sum({$<batch_id = {'1'}, campaign_id = {"Need to pass dynamic values to here depending on week"}>}user_completed)
If i want current week campaigns i need to pass the current week campaigns, If last week i need to pass last week campaigns.
campaign_start_date batch_id campaign_id
05-17-2016 1 400
05-17-2016 1 401
05-17-2016 1 402
05-17-2016 1 403
Now i need to include these 4 campaign_id's to above set analysis how can i achieve this.
Regards,
Pramod
Message was edited by: Kumar Pramod
no problem if i hardcode the batchId but i need dynamic campaign_id on the basis of that batch_id
then try this
count({$<DateType= {"completion"},final_test_status={"passed"},
campaign_id = {"$(=concat( distinct {<batch_id={'1'}>} chr(39) & campaign_id & chr(39) ,','))"}>} invitation_id)
Your current expression returning zero
you have left one more constraints that start_date of campaign_id should be checked, that should be 17-05-2016 for this week and next week it should be change to 24-05-2016
This Date is also hardcoded or it is Weekstart Date?
Weekstart Date
then try this
count({$<DateType= {"completion"},final_test_status={"passed"},
campaign_id = {"$(=concat( distinct {<batch_id={'1'},campaign_start_date={"$(=Date(Weekstart(today()),'DD/MM/YYYY'))"}>} chr(39) & campaign_id &chr(39) ,','))"}>} invitation_id)
Note: Change your Date format accordingly and should match with campaign_start_date date format
Sorry it's not working,
$(=chr(39) & Concat(Distinct {<batch_meta_data_id={'23','24'}>} campaign_id, ',') & chr(39)) If i use this expression text image it's printing all the campaign id's
if i add below expresion it's not printing anything
campaign_start_date={"$(=Date(Weekstart(today()),'DD-MM-YYYY'))"}
If i add the same thing to complete expression it is printing zero
Hi Sunny please help on this,
count({$<DateType= {'completion'},final_test_status={'passed'},
campaign_id = {
$(=chr(39) & Concat(Distinct {<batch_meta_data_id={'23','24'},
current_start_date=(=Date(Weekstart(today())+1))>} campaign_id, ',') & chr(39))
}>} invitation_id)
If i hardcode campaign_id like below it's working but not for dynamic values how can i fix this.
count({$<DateType= {'completion'},final_test_status={'passed'},
campaign_id = {351,352}>} invitation_id)
Even this is printing the value in image and text object
$(=chr(39) & Concat(Distinct {<batch_meta_data_id={'23','24'},current_start_date=(=Date(Weekstart(today())+1))>} campaign_id, ',') & chr(39))