내 커뮤니티 업적 표시줄을 확대합니다.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Getting send indicator of delivery in a query

Avatar

Level 4

Hello all,

 

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:

Label                                           DynamicSent

[2022/03/03] Name delivery        12

[2022/03/04] Name delivery        7

 

What I want, it is the following

Label                        Sent

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
1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 6

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.

원본 게시물의 솔루션 보기

7 답변 개

Avatar

정확한 답변 작성자:
Level 6

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.

Avatar

Level 4

Thanks @johnwwilcoxmba 

 

I have tried including in the query, Primary= "Yes"

LAR1985_0-1646930221216.png

And in the output data I only get the proofs done:

 

Label                                           Send

[Proof 10] Name Delivery 1           4

[Proof 1] Name Delivery 2             1

 

Thanks

Avatar

Level 6

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: 

johnwwilcoxmba_0-1646938895007.png

 

Avatar

Level 4

The query is set up of the following way:

 

Properties

LAR1985_0-1646990544992.png

Target

 

LAR1985_3-1646992495304.png

 

Additional data:

 

LAR1985_2-1646990941808.png

 And I get the following in "Open Transition":

 

LAR1985_5-1646992699364.png

 

 

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):

 

LAR1985_6-1646992981135.png

 

Thanks

Avatar

Level 6

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.

johnwwilcoxmba_0-1647007467458.png

 

 

Avatar

Level 6

Try this logic instead.

johnwwilcoxmba_0-1647009722044.png

 

Avatar

Administrator

Hi @LAR1985,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know.
Thanks!



Sukrity Wadhwa