7 Replies Latest reply on Dec 23, 2018 7:28 PM by sajad.bhat

# Need a condition that

i need a condition tht i wanted to see the order date which is less than today-365 also sales>100000.

so the output should show all the data as true if the condition matches sales>100000 and date >today-365 in a single calculation

• ###### 1. Re: Need a condition that

Hi Sunil,

Try creating a calculated field on Order Date with below calculation and then use it on filter self :

if ([Order Date] < (DATEADD('year', -1, DATE(TODAY()))) and [Sales] > 100000) then

true

ELSE

false

END

1 of 1 people found this helpful
• ###### 2. Re: Need a condition that

Hi Sunil,

Hope this calculation helps

If it helps

BR,

NB

• ###### 3. Re: Need a condition that

Hello Sunil,

You could try the following calculation which will result in a similar view in the screenshot below.  Nothing in the Superstore data for individual date sales is equal to or greater than 100,000 so I brought the number down to 10,000 to get the result.

This calculation was developed by Jonathan Drummey to help another situation out.  Thx, Don

YEAR([Order Date]) == YEAR(TODAY())-1 AND (MONTH([Order Date]) < MONTH(TODAY()) OR (MONTH([Order Date]) == MONTH(TODAY()) AND DAY([Order Date]) <= DAY(TODAY())))

AND [Sales]>10000

• ###### 4. Re: Need a condition that

Does this give you what you're looking for?

IF [Sales]>=1000000 AND DATEDIFF('day',[Order Date], TODAY())>=365 THEN

TRUE

ELSE

FALSE

END

• ###### 5. Re: Need a condition that

Thank you for  the response.
And it is half way though,
when i click on false , the dates from 25th december to 31 st dec 2017 should be hidden ..

• ###### 6. Re: Need a condition that

All, Thank you for  the response.

And it is half way though,

when i click on false , the dates from 25th december to 31 st dec 2017 should be hidden ..
when it display true the false are hidden , when the false is displayed true dates are seen which should be hidden.

• ###### 7. Re: Need a condition that

Hi Sunil,

Create two separate calcs. like below:

Calc1:-

(IF

SUM([Sales])>=1000

THEN 'Y' ELSE 'N' END)='True'

Calc2:-

(IF (DATEDIFF('day',[Order Date],TODAY())<=365)

THEN 'True' ELSE 'False' END)='True'