Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a chart that I am working on and am having an issue on how to write the expression so that it only shows invoices and a specific detail type (INV|DetTypeID) with $0 as the INV|UnitLastCost. My expression is a follows:
Sum({$<INV|VoidFlag={N},INV|DetTypeID={1,2,3,12,13,14}, Only(INV|UnitLastCost=0)>}INV|UnitLastCost)
The returned value should be 0. If I run it as Only(INV|UnitLastCost=0), then it returns a -1...
How can I write this correctly.
Thanks in advance!
I don't believe you need the only function. Please try this
Sum({$<INV|VoidFlag={'N'},INV|DetTypeID={1,2,3,12,13,14}, [INV|UnitLastCost]={0}>}INV|UnitLastCost)
No it did not work, this does not return any data then.
Instead of using sum, maybe you should try count. In this case instead of INV|UnitLastCost use the invoice id.
Count({$<INV|VoidFlag={'N'},INV|DetTypeID={1,2,3,12,13,14}, [INV|UnitLastCost]={0}>}InvoiceID). Hope this helps.
do you want to sum INV|UnitLastCost when INV|UnitLastCost=0?
Sum({$<INV|VoidFlag={N},INV|DetTypeID={1,2,3,12,13,14}, INV|UnitLastCost={0}>} INV|UnitLastCost)
I wanted to add that you should have the invoiceid as a dimension in the chart.
This way you are counting invoices with the attributes you're looking for. Is this what you want?
This is closer to what I need. Will let you know...