Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have an application that using a combination of previous and peek, calculates the current stock based on some records... The problem is, that the line stops if there isn't a change (as there isn't a record to calculate) so if there's only ever been one change/record, the line chart will show a dot.
What I would like to do, is continue the line even if there isn't a change - just a constant line!
I've created a simple application to show what the problem is, does anyone have any ideas? I'm hoping it's something very simple that I've overlooked!
Kind Regards,
Dayna
You need to create the cartesian products of all dates/months and products and populate missing values. Attached you will find one example of how to do this.
You need to create the cartesian products of all dates/months and products and populate missing values. Attached you will find one example of how to do this.
Wow, that's perfect - I've tested it on my complex data source, and it looks like it works! Thank you so much for your help!
Henric,
A quick query, based on the above - how would you add a site cartesian? For some products, they have mutliple sites, so ideally it would have a record with the previous value for the difference site combinations.
I thought it would be as simple as adding it to my rangesum expression and creating a cartesian site, but this didn't work. Your help would be appreciated!
Kind Regards,
Dayna
I assume that you want to use the previous value for that specific product at that specific site (as opposed to the value at another site). Then the answer would be along what I have in the attachment.
It is basically the same, but with a couple of small changes:
* The cartesian product now has three dimensions (SITE, PRODUCT, TIME) instead of two
* In the final load statement you have to ORDER BY all three dimensions
* In the final load statement you need to test not only that PRODUCT=Peek(PRODUCT) but also that SITE=Peek(SITE)
And that's it...
Henric
I was so close... Thanks again Henric!