Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I've built a pivot which presents monthly customer purchases by brand (rows have customer ID, brand, then values for total $ purchase per month; columns are the months). The columns are of type "decimal".
I'm trying to build a new column which displays the total spend for six months by customer by brand. I'm trying use a simple column_1 + column_2 + ... + column_6 formula in the new column.
I'm getting strange results. For example, a row that features the values: 427.75, 913.0, 495.0, [no value], 150.0, 288.0 is returning the following result: 495.0913.0427.75.
Here's what the formula looks like in the Editor Panel:
Operating system used: MacOS Monterey v12.4
Operating system used: MacOS Monterey v12.4
Hi @wjkelly,
You should be able to achieve the output youโre looking for with the sum() method. I've included an example below for reference.
In some cases, the โ+โ operator can result in concatenation, for instance, if there are missing values in the columns that are being computed. Please see our knowledge base article Safe Sums across Columns in Dataiku DSS Formulas for more details on that.
Please let us know if you have any questions.
Thanks!
Jordan
Hi @wjkelly,
You should be able to achieve the output youโre looking for with the sum() method. I've included an example below for reference.
In some cases, the โ+โ operator can result in concatenation, for instance, if there are missing values in the columns that are being computed. Please see our knowledge base article Safe Sums across Columns in Dataiku DSS Formulas for more details on that.
Please let us know if you have any questions.
Thanks!
Jordan
Hi Jordan,
Thanks so much for this response. The sum([column_1,column_2 etc]) solution worked perfectly. And thanks too for the background info to help me understand why the "+" was not an ideal solution here.