Im trying to do a Saved Search for open purchase o...
# general
s
Im trying to do a Saved Search for open purchase orders…i have about 100 purchase orders with 5 different items coming to the warehouse within the next several months. I’m trying to figure out how I can pull this data by month into one report. So it will give me the total quantities for item 1 in September, October, November and December separately
b
if you want your months as columns, expect to have a formula which uses a CASE statement in combination with TO_CHAR and the MM element
s
Can you send me to the right direction to create this formula please?
b
i rarely will have anything on hand
general idea is to use a case statement where the case expression acts as filter where the month element retrieved using TO_CHAR is equal to the month you want
s
case when (to_char({expectedreceiptdate},‘MM’)),‘10’ then {quantity} else 0 end
This is what I came up with but its says invalid expression
im putting it under formula numeric
b
its the
,'10'
part
should be checking that its '10' there
s
i put the 10 in there because i wanted all the quantities for october
b
what you have there is not a predicate, there is no condition that evaluates to true or false
👍🏻 1
s
case when (to_char({expectedreceiptdate},‘MMDDYYYY’))= ‘10’ then {quantity} else 0 end
Im close
case when (to_char({expectedreceiptdate},‘MM’))= ‘10’ then {quantity} else 0 end
GOT IT!!