cancel
Showing results for 
Search instead for 
Did you mean: 

Date is not picking correctly in Count Foreach

0 Kudos

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.

Thanks

Amritha.

Accepted Solutions (0)

Answers (0)