Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this formula that gives me some result based on some criteria, including the selected Year. This works fine.
Count({$ <P_STATUS={'A'}, TOTAL_CHARGE = {">0"}, TRN_CODE = {0}, Year_DOS = {$(=Only(Year_DOS))} >} Distinct LFN_NO)
In a different column I want to do the same for the prior year, so I changed the formula a little bit. This is not working, it gives me zero as result for all dimensions.
Count({$ <P_STATUS={'A'}, TOTAL_CHARGE = {">0"}, TRN_CODE = {0}, Year_DOS = {$(=Only(Year_DOS)-1)} >} Distinct LFN_NO)
What am I doing wrong?
Thanks in advance for your help.
What you doing seems correct. It works for me. May be something is wrong with your field type for the year field. Are you taking year out of a date field in your data model? Is it a text field? You can put that field on the document and see (based on right, left justification) if it is somehow considered a text field. Or may be something wrong with you dimensions. The formula you are using is correct and worked for my test document (enclosed).
Hope this helps.
I am getting the year out of a date field from my data model. Interesting if I do a -0 it works, the problem is with the -1