Hello,
I need your help to fix a simple Macro error "...Parse Error at char(9): Unknown variable Product.." which I am not able to fix even after spending many hours.
I am trying to run linear regression in batch modes using all combinations of 2 key dimensions in data. Since Linear Regression tool doesn't have a Group By option I am trying to do it using a macro.
The input data consists of few metrics (sales, pricing, distribution) and two key dimensions markets and products. I wanted to subset the data for each Market and Product combination and pass it to the Regression tool to run iteratively.
Thanks!
Solved! Go to Solution.
I made some modifications to your worklow and macro.
Please take a look and see if this fits well to your needs. You might need to replace the Model Coefficients macro since mine is attached to my Predictive tools palette.
Cheers,
You are getting the error because the Product field is of type String 9 and in the Filter tool (within your Macro) you are searching for a literal value of "P" via Product = "P". What are you trying to do in the filter? I assume you maybe want to search whether the Product value contains a "P", if this is the case you can use the Contains function such as Contains([Product],"P") in the filter.
This is why you are getting the error.
Thanks for the solution Thableaus! It works fine now.
Thanks Rishi! The literals "P" and "M" are just placeholders to feed values of Product and Market respectively from the Input dataset. Anyways the solution @Thableaus worked for me. He removed all action tools and directly fed the values to filter tool through control. Thanks again for your support.
Thanks WilliamR for the help. I tried the modified version you sent, it is not working. It just have one control parameter and hence not updating the filter condition values which is expecting 2 sets of values. Thanks for your time and much appreciated.
User | Count |
---|---|
18 | |
14 | |
13 | |
9 | |
8 |