I am currently using the following expression...

expressions
(James Fussell) #1

I am currently using the following expression to give me a daily sales total by rep.

=SUM(SELECT(Customer Orders[Order Total],AND([Date2]=TODAY(),[Rep]=[_THISROW].[Initials])))

I am struggling to get a month-to-date, and year-to-date sales total. Can you help with this?

#2

Hi @James_Fussell Have you had a look at the Sales Report sample app?

(Aleksi Alkio) #3

How about SUM(SELECT(Customer Orders[Order Total],AND(YEAR([Date2])=YEAR(TODAY()),MONTH([Date2])=MONTH(TODAY()),[Rep]=[_THISROW].[Initials])))

(Steven Coile) #4

To match rows where [Date2] is in the current month:

[Date2] > EOMONTH(TODAY(), -1)

To match rows where [Date2] is in the current year:

YEAR([Date2]) = YEAR(TODAY())

(James Fussell) #5

That works. Great Thanks.