Forum Discussion
Custom Column with 2 IF Statements - Dates and %
Hi guys,
having a bit of trouble coming up with a solution to making a column that has 2 IF Statements with 2-3 conditions per IF.
I am trying to see what sale has the following conditions:
1 -
- Date - 6 Months < today
- % is between 0 and 5
2-
- Date - 12 Months < today
- Date - 6 Months > today
- % is between 6 and 10
the return being hex color code if it is good or bad, good being if true and bad if false.
how would i go about doing this?
I have tried doing this all in one column but i havent got anywhere, and tried doing seperate columns then merging but this wont work either.
I will use this column as a function in a conditional format for my %'s
paulfink , Create a new column like
Switch( True() ,
Date(year([Date]), month([Date]) -6 , day([Date]) < today() && [%] >0 && [%] <.05 , "1",
Date(year([Date]), month([Date]) -12 , day([Date]) < today() && Date(year([Date]), month([Date]) -6 , day([Date]) > today() && [%] >0.06 && [%] <.1 , "2"
)
2 Replies
- amitchandak
Super User
paulfink , Create a new column like
Switch( True() ,
Date(year([Date]), month([Date]) -6 , day([Date]) < today() && [%] >0 && [%] <.05 , "1",
Date(year([Date]), month([Date]) -12 , day([Date]) < today() && Date(year([Date]), month([Date]) -6 , day([Date]) > today() && [%] >0.06 && [%] <.1 , "2"
)
- paulfink
Post Patron
had to do a bit of twerking but this was exactly what i needed thank you!