Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Chart Expression Assistance

Hello!

I'm stuck on an expression for a chart I'm putting together.

Data is laid out as per the table below.  This is a very small subset.

PKT_CTRL_NBRDIVCHANNELCREATE_DATEPRINT_DATEUNITS
8370650WHOLESALEWHOLESALE12/14/201501/13/201613
8370651WHOLESALEWHOLESALE12/15/201501/06/201626
8370652WHOLESALEWHOLESALE12/29/201501/04/20166581
8370653RETAILDOS12/29/201501/04/20164546
8370654WHOLESALEWHOLESALE12/30/201501/04/20162167
8370655RETAILDOS12/30/201501/04/20162167
8370656WHOLESALEWHOLESALE12/30/201501/05/2016264
8370657RETAILDOS12/30/201501/08/20161996
8370658WHOLESALEWHOLESALE12/31/201501/04/20161000
8370659RETAILDOS12/31/201501/04/2016891
8370660WHOLESALEWHOLESALE12/31/201501/08/2016100
8370661RETAILDOS12/31/201501/08/2016236
8370662WHOLESALEWHOLESALE12/31/201501/12/2016576
8370663RETAILDOS12/31/201501/13/2016100
8370664WHOLESALEWHOLESALE12/31/201501/13/2016194
8370665WHOLESALEWHOLESALE01/01/201601/04/2016101
8370666WHOLESALEWHOLESALE01/03/201601/04/2016500
8370667RETAILDOS01/03/201601/04/2016768
8370668WHOLESALEWHOLESALE01/03/201601/05/2016500
8370669RETAILDOS01/03/201601/05/2016526
8370670WHOLESALEWHOLESALE01/03/201601/06/2016200
8370671RETAILDOS01/03/201601/06/2016298
8370672WHOLESALEWHOLESALE01/04/201601/04/2016192
8370673RETAILDOS01/04/201601/05/20168426
8370674WHOLESALEWHOLESALE01/04/201601/06/20161107
8370675RETAILDOS01/04/201601/13/2016124
8370676WHOLESALEWHOLESALE01/04/201601/20/201694
8370677RETAILDOS01/04/201601/26/201681

What I'm trying to show is how many UNITS were available to print each day. 

What I'd like to see is something like this:

PRINT_DATEUNITS_CREATEDUNITS_PRINTEDUNITS_AVAILABLE
01/04/2016100241891333774

Then the pattern would repeat for each day.  The units available would be the total of units printed that day and units created but not yet printed.  Is this even possible?  Any help would be fantastic.

12 Replies
Anonymous
Not applicable
Author

Hello,

Thanks for the sample, however this does not seem to work for other dates, as you'd have to select the exact CREATE dates for a given Print date.

What I'm hoping to achieve is the table posted above by Johnathan Dienst, but with all data still available.

qliksus
Specialist II
Specialist II

hi ,

Change the Expression as

sum({<Date=,Flag={'C'}>}UNITS)  and select the Full Accumulation Option

jonathandienst
Partner - Champion III
Partner - Champion III

kkkumar82 wrote:

Hi Jonathan,

Could you please elaborate

RangeSum(UnitsCreated, -Previous(UnitsPrinted), Peek(UnitsAvailable)) as UnitsAvailable 


The above line especially -Previous(UnitsPrinted)



This is a null-safe way of calculating:

     UnitsCreates - Previous(UnitsPrinted) + Peek(UnitsAvailable)

If any of the terms is null, the whole expression evaluates to null. RangeSum will treat a null in any individual term as zero, so the expression will evaluate correctly.

Previous = get the value from the previous record of the load's source

Peek = get the value from the previous record of the load's output

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein