I'm trying to see MTD how many distinct dates had sales. So I don't need to see how many days or work days there were MTD, just how many distinct dates this month had sales.
I've got these separate parts, but I don't know how to put them together without getting an error.
This part was to designate the ID's within the date range I want
IF (
MONTH (TODAY()) = MONTH ([SALES DATE])
AND DAY([SALES DATE]) <=DAY (TODAY())
THEN 1
ELSE 0
END
This part was then to get a distinct count of those I designated with the number 1
SUM({FIXED [ID] : AVG ( IF DATETRUNC('MONTH',TODAY()) = DATETRUNC ('MONTH', [SALES DATE])
AND DAY([SALES DATE]) <= DAY(TODAY())
THEN [MTD SALES DATES] END)})
Any help would be great!
Hi @Samantha Taylor
I did use the Superstore data to create a calculation which counts the dates from current month on which an order was made:
COUNTD(IF DATETRUNC('month',TODAY()) = DATETRUNC('month',[Order Date]) THEN [Order Date] END)Is this sufficient for your purpose?
Kind regards,
Johan de groot