Forum Discussion
badger007
4 years agoFrequent Visitor
Conditional sum of a column
Hi guys,
I have a table with dates and column values. Also, I have two measures: one with the third month from today, and a quantity to be applied.
The goal is to apply the quantity, in this case, it's 300, to the sum of values in the product_2 column (it'll always be this column) where the month equals the date_to_apply measure. In the example, the (200 and 200 and 200) from September rows should become 900.
I'm struggling with this operation.
Thanks for your time and help.
could you pls provide the sample data ,not the screenshot
maybe you can try this
measure= if(max(month)=month(today())+2, sum(product2)+300,sum(product2))