Skip to main content

I have a rather large transaction list (roughly 5M rows) with several dimensions.  I need to map the combination of these unique dimensions to assign my data into user managed groupings.  To do that, I need to do a 2 part calculation by first concatenated the various dimensions and then matching it to the grouped dimension.

MATCH(

'_ Subscriber Activity'.'Account Type'.Name &"-"& '_ Subscriber Activity'.'Product Group'.Name &"-"& '_ Subscriber Activity'.'Product Subscribe Group'.Name &"-"& '_ Subscriber Activity'.'Device Sub Cohort'.Name &"-"& '_ Subscriber Activity'.'Device Type Cohort'.Name &"-"& '_ Subscriber Activity'.'Marketplace Cohort'.Name &"-"& '_ Subscriber Activity'.'Customer Subscribe Category'.Name,

'_ Product Attributes'.Name)

 

The problem is that I get an error that is: “Product Attributes: Formula timed out (> 3 minutes)”.  I’m not sure how to work around this error with a more optimized approach.  Any help will be much appreciated.

Kevin

Hi, from the look of it, the formula may be very taxing on processing as it combines multi concatenations + matching in one go

I would try to split the formula in 2 with one part doing the concats and the second one calling the first and doing only the matching and see where it gets you from there.

As a general piece of advice in financial modelling, it s best to separate concerns into dedicated line items (or whatever is called in the tool you are using) rather than long multipurposes formulas

 


Thank you for the reply.  I’m not sure I totally understand what you mean by splitting up the formula in 2.  Is this something where you would create a property that just does the concatenation and then another property that does the match?  So one field would be a text and the other a dimension?  Or is there another way to split up the formula in just one property.  Any additional insight would be appreciated.


I’ve tried multiple approaches to breaking up this formula and everything times out.  Does it matter if I am working in the Dev environment instead of the Prod environment?


Assuming none of the 7 drivers can be empty, I would suggest using a mapping Metric of type dimension ‘Product Attribute’ dimensioned by ‘Account Type’, ‘Product Group’, ‘Product Subscribe Group’, ‘Device Sub Cohort’, ‘Device Type Cohort’, ‘Marketplace Cohort’ and ‘Customer Subscribe Category’

This lets you map combinations directly to ‘Product Attribute’ instead of relying on the string concatenation which is inefficient given your volume of data.

If blanks are possible, consider adding an N/A member to each dimensions so the mapping always resolves cleanly.


Thank you for your reply.  The mapping metric concept is new to me, so I am a bit lost on what to do once I set up the metric like you indicated.  How do I integrate that metric into the transaction list that I created?  Appreciate all the help so far.


If you really need to bring the mapping directly into the ‘_ Subscriber Activity’ transaction list you can create a property of type ‘_ Product Attributes’ and use the following formula :

 

Mapping_Metric [ BY : '_ Subscriber Activity'.'Account Type', '_ Subscriber Activity'.'Product Group', '_ Subscriber Activity'.'Product Subscribe Group', '_ Subscriber Activity'.'Device Sub Cohort', '_ Subscriber Activity'.'Device Type Cohort', '_ Subscriber Activity'.'Marketplace Cohort', '_ Subscriber Activity'.'Customer Subscribe Category' ]

 

However I would recommend aggregating your data first :

 

Aggregation_Metric = Amount [ BY SUM : '_ Subscriber Activity'.'Account Type', '_ Subscriber Activity'.'Product Group', '_ Subscriber Activity'.'Product Subscribe Group', '_ Subscriber Activity'.'Device Sub Cohort', '_ Subscriber Activity'.'Device Type Cohort', '_ Subscriber Activity'.'Marketplace Cohort', '_ Subscriber Activity'.'Customer Subscribe Category' ]

 

Then add the ‘_ Product Attributes’ dimension using the mapping metric :

 

Result_Metric = Aggregation_Metric [BY : → Mapping_Metric]

 

This approach should be faster than applying the mapping in the 5M-row transaction list.