Showing results for 
Search instead for 
Did you mean: 
AlejoRivera Visitor

obtaining a result based on a conditional sum in the same column

Hello community, I need help to obtain a result based on a conditional SUM in the same column. I don't which is the easiest way, creating  "custom column" or a measure.  


I've the following table, 



| 1234            |      1                       |
| 1234            |      4                       |

| 1234            |      8                       | 
What I want to create is a new column or measure to obtain a new result:  

If "Document#" SUMS "5" then, "Product X", Otherwise, Product_step.




| 1234            |      1                      |    Product X         
| 1234            |      4                      |    Product X          

| 1234            |      8                      |    8                        

The "document#" are mostly uniques but each of one of them can pass trough 2 or 3 "Product_steps", not that often but it can,  and if it does, then it becomes in a diff type of product, which is what I need to identify creating a new column or measure.


I know that with this formula I'll have duplicates, but I cansimply divide the total outcome in 2 to have the exact number. Or if you can suggest a better way to do it, I'm all ears (eyes)

Important note: My tables are from a server, thus, I can't edit the structure that much. 

Thanks a lot!!

Community Support Team
Community Support Team

Re: obtaining a result based on a conditional sum in the same column

Hi @AlejoRivera,


In this scenario, you should create custom column to get the desired result. As in a measure, it is not possible to compare each item (DOCUMENT#) of one column with a specific value (Sums) insde IF function and return multiple values that can generate a column. The expected logic only applies to calculated column.


Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.