Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
berryandcherry6
Creator II
Creator II

Aggr records of first record in the selection

Hi,


I have a requirement where when user selects batches in filterpane, based on batch selected, only first campiagn(i.e min campaign ID) of selected batch's count of invitation have to be displayed


For this i have used below set analysis:

Count({$<DateTimeType = {'open_time'},campaign_id={"$(=min(campaign_id))"},opened = {'1'},client_id = {'12'},batch_id={'2','3','6'}>}distinct invitation_id)


But this is taking first campaign(i.e min campaign ID) of client and giving count of that campaign regardless of batch selection.


I want count of invitation of first campaign of the batch selected. How could i do this?

1 Solution

Accepted Solutions
sunny_talwar

May be this

Count({$<DateTimeType = {'open_time'}, campaign_id = {"$(=min(campaign_id))"}, opened = {'1'}, client_id = {'12'}, batch_id *= {'2','3','6'}>} DISTINCT invitation_id)

View solution in original post

6 Replies
sunny_talwar

When you say batch selection, you mean to say you are selecting in batch_id field?

berryandcherry6
Creator II
Creator II
Author

Yes, batch_id field in filter pane.

sunny_talwar

May be this

Count({$<DateTimeType = {'open_time'}, campaign_id = {"$(=min(campaign_id))"}, opened = {'1'}, client_id = {'12'}, batch_id *= {'2','3','6'}>} DISTINCT invitation_id)

berryandcherry6
Creator II
Creator II
Author

Hi Sunny,

Even my expression working fine. I was wrongly analysing the data.

Can you explain reason to add * after batch_id. What does it do?

berryandcherry6
Creator II
Creator II
Author

Thanks Sunny. Even your answer works so i am marking as correct answer.