6 Replies Latest reply on Aug 8, 2018 10:43 AM by Josh Williams

# How to display current sales data while having option to view prev data

Hi, I am currently using the formula:

IF {MAX([Date])}=[Date]THEN [sales] END

To display the most recent sales data. In addition to displaying the recent data, I also want the option where I can also get past sales information through any means such as filters. Is this achievable? Thank you

• ###### 1. Re: How to display current sales data while having option to view prev data

IF [Date] <{Max(Date)}THEN [sales] END

• ###### 2. Re: How to display current sales data while having option to view prev data

Josh,

One option is instead of this calculation you can create a T|F calculation as:

{MAX([Date])}=[Date]

Then use this as filter. If user chooses TRUE then only current data will be shown, If both true/false then all the data.

Thanks,

Ankit Bansal

• ###### 3. Re: How to display current sales data while having option to view prev data

So i can just use the sales data and display it right?

• ###### 4. Re: How to display current sales data while having option to view prev data

I tried it, but the thing is, when I pick both true and false, it shows all the data up to date. However I want to option to be able to select the previous date and get sales data for that particular date.

So for example: If I want to see the sales data for July 4th 2018, I can view sales data only for that day.

Thank you

• ###### 5. Re: How to display current sales data while having option to view prev data

Josh,

I that case you can simply create a filter and choose below option in yellow.

No need to create any other calculated field.

• ###### 6. Re: How to display current sales data while having option to view prev data

Hey, thank you so much for the help. Now lets say that I want to get rid of dates that have no sales data (weekends). How can I make it so that whenever there is no data for that date, the filter doesnt display that day?

For example: on August 4th and 5th, 2018 (sat, sun), there is no sales data. I dont want those dates to show up