Skip to Content

Date is not picking correctly in Count Foreach

Hi All,

I need help in the variable.

I created 4 fields

cpro Count CY, qro count cy , cpro count py ,qro count cy

For CY - I am using Calendar day from the universe.

For PY - I calculated "PY_Close_Date = Relativedate(Date;-364)" As my requirement was to show date/same day from previous year and current year.

I calculated CPRO Count CY = "([Order Count]) ForEach([Calendar day]) Where ([Customer Pay Indicator] = "Yes")" I got the correct values.

However, when I am using same formula for PY .. I used

"([Order Count]) ForEach(PY_Close_Date) Where ([Customer Pay Indicator] = "Yes")" -- I still get current year values. Values are showing incorrectly.

I also tried converting "Relative date" column to "todate" in a separate column and formatdate in separate column. It is still showing same values. It is not picking PY Date values.

See attachment. CY values are showing correctly. However , PY are showing incorrectly. They are still picking current year dates.

Could someone please assist on why? How to write the formula?

Any help is greatly appreciated.



Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers