Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
usamabinsadiq
Contributor III
Contributor III

Current Week distinct date count

can anyone help me out?

I am using the following statement and I want the count of the current week's dates, but I am getting 0, I don't see any syntax or logical error, please help me to resolve this.

Count({$<[RECON.Date] = {'>=$(=Date(WeekStart(Max([RECON.Date]), 0, 0))),<=$(=Date(WeekEnd(Max([RECON.Date]), 0, 0)))'}>} distinct [RECON.Date])

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.
Labels (1)
1 Solution

Accepted Solutions
usamabinsadiq
Contributor III
Contributor III
Author

The 0 was showing due to a single quote changing it to double quote resolved it, also I removed , from between because of , it was treating it as 2 separate data sets and showing more result then expected.

Count({$<[RECON.Date] = {">=$(=Date(WeekStart(Max([RECON.Date]), 0, 0)))<=$(=Date(WeekEnd(Max([RECON.Date]), 0, 0)))"}>} distinct [RECON.Date])

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.

View solution in original post

1 Reply
usamabinsadiq
Contributor III
Contributor III
Author

The 0 was showing due to a single quote changing it to double quote resolved it, also I removed , from between because of , it was treating it as 2 separate data sets and showing more result then expected.

Count({$<[RECON.Date] = {">=$(=Date(WeekStart(Max([RECON.Date]), 0, 0)))<=$(=Date(WeekEnd(Max([RECON.Date]), 0, 0)))"}>} distinct [RECON.Date])

if my replay helped you then please press like button and do not forget to press the "Accept as Solution" button.