Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey,
I have a problem with a formula: I want to calculate the sum of a field's values only if another field is greater than 1 (or 2, 3...).
I want to calculate the sum of my "available stock" column, for each product hierarchy group (I have a "group level" column which takes the value 1, 2, 3, 4, 5)
I've tried this formula :
Sum(if(group_level>=1, available stock))
but it returns 0
The column "group level" is not in the same table than available stock but both tables are linked
What is the problem ?
Hi
Something like
SUM(<group-level={">1"}>)[available stock])
it doesnt work ...
I tried this : SUM({<group-level={">1"}>}available stock) it returns 0 too
up
Hi @Guilgo ,
Try this out-
if( group_level >=1 , Sum( [available stock] ) )
Your field is having space you should keep that in square brackets.
Hope this will help...........
Thanks,
Tanish
it doesnt work
it doesn't return anything, maybe because group_level is field and I can't compare it to any value
SUM({<group-level={"=1"}>}available stock) returns a value but the same as SUM({<group-level={"=2"}>}available stock etc...) (and the same as SUM({<group-level={"=8"}>}available stock) while the maximum value for group_level is 5...)
Count({<group-level={"=3"}>}group-level) returns the total of number of rows .... filter doesnt work
Could you please check from data model viewer if your group-level field datatype is numerical integer or text.