Jump to content

Limit Max(Day) = Day(DateTimeNow()) - 1

Hesloan Viana

Recommended Posts

Hello all, is there a way so I can limit my Max day of the date to be my Day(DateTimeNow()) - 1


For example:

Today, day 3, i want to see all the sales for every month in 2019 until day 2 ( Day(DateTimeNow()) - 1 )


Edit: When i try something like Max(Day([DATE])) = Day(DateTimeNow())-1, I just get "False" or "True".

Link to comment
Share on other sites

  • 2 years later...

Normally to get the sales in a given Range (like Previous Year to Date, or Previous Month to Date) I would do something on the visualization calculation or calculated field.

Case when Day([Date) <= Day(DateAdd('day',-1,DateTimeNow())) then [sales Amount] End as [To Date Sum]

This will create a column with just the Sales Amounts populated that fit the range you want.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...