I want to get the number of send in a primary delivery in a query. I have selected as target "Delivery" and in "Additional data", if I choose "dynamicIndicators/@dynamicSent", I get the following:
[2022/03/03] Name delivery 12
[2022/03/04] Name delivery 7
What I want, it is the following
Name Delivery 19
I have tried choosing in "additional data", the following "[masterKpis/@sumSent]", but I get the following error:
PGS-220000 PostgreSQL error: ERROR: INSERT has more target columns than expressions LINE 1: ...INSERT INTO wkf114074112_70_1 (iMasterKpisSumSent,iId) SELEC...
Can someone help me?
Thanks in advance
The easy fix is to in you query select Primary = Yes. That gives you an overall total for that delivery. If you want a monthly total, you will need to change your recurring deliveries to aggregation period to a Month. Your example indicates it is set to Day. If you do the later then you can select only the current month totals by filtering the labels that have the current month and year.
Under properties, is the resource and targeting dimension Deliveries (Delivery)?
Add @label in additional data. Then run the query with the next step paused. Click on the #record count, click open transition, then data. You should see this:
The query is set up of the following way:
And I get the following in "Open Transition":
I think our example is different from yours because in our case, we use recurring deliveries, so we have, two records for "Agra" delivery, one for each day, we need but we need to extract the "sent" of the master delivery. We would like a field like the following one (sent Master= the summary of the send of each delivery created in each execution of master delivery, example 1.6k=33+1,57k):
I don't see your primary = yes in the query logic. I had that turned on which sums up in 1 delivery. I do have recurring deliveries but they are removed and only shows the parent or primary delivery. When you use Primary = Yes it will not show you single deliveries so I added a Label clause.