Quantcast
Channel: KNIME RSS
Viewing all articles
Browse latest Browse all 4157

Difficulty Joining Tables

$
0
0

I have subscription sales data that I am working. Companies subscribe to a product which can consist of a number of different modules. I am tracking quarterly results, and therefore am looking to identify price movements each quarter customers are invoiced. The data is something like the below:

Prod_IDMod_IDInv_YrInv_QtrSub YrPrice
0120131201350
02201312013150
01201412014100
02201412014200
03201412014300
01201522015150
02201522015250

 

I want to compare and classify the price change of subscriptions across different subscription years. To do this, I duplicated the table, created a Prev Year column, and did a left outer join on Subscription Year to Prev Year. So far so good - I'll be able to identify that this customer was 'New Business' and invoiced in 2013Q1, and with some extra effort I can identify they 'Upsold' module 3 in 2014Q1. I can do a group by on the Product Level to identify the % price change for each customer in each quarter.

Prod_IDMod_IDInv_YrInv_QtrSub YrPricePrev YrPrev Price
012013120135020120
0220131201315020120
01201412014100201350
022014120142002013150
0320141201430020130
012015220151502014100
022015220152502014200

 

What I cannot do however is identify that they downsold module 3 again in 2015. I would like to add a row that looks something like this:

Prod_IDMod_IDInv_YrInv_QtrSub YrPricePrev YrPrev Price
0320152201502014300

 

I haven't been able to solve this problem - there is no row signalling the customer paid nothing for module 3 in 2015, so it seems there is nothing to join to. The only thing I can think of is to do a join on Sub Yr and a created Next Year column, but it will not fit into the data table I've already created.... I hope I explained this well enough, let me know if there is any more explaining required. Please could you help me with a solution using the parameters I've already provided?


Viewing all articles
Browse latest Browse all 4157

Trending Articles