Link to home
Start Free TrialLog in
Avatar of Melvin Ellis
Melvin Ellis

asked on

Trying to get Background colors to show on specifc dates

I'm trying to write a expression in the fill to  get colors to appear in 2 different groups. If a person has been here more than a year I want there date to turn white if they have been here less than  year I want there date to turn Orange. When I run my expression I keep getting errors or no colors will show. Below is my Expression

=IIF(DateDiff(DateInterval.Month,Lookup(Fields!AgentID.Value, Fields!AgentID_FON.Value, Fields!BLStartDate.Value, "BLDate"),
Parameters!OverallStartDate.Value)>=12,"White", "Orange")
Avatar of Russell Fox
Russell Fox
Flag of United States of America image

I don't see anything wrong off the cuff, but if you can move that Lookup into the source query instead, that would be ideal. Lookups on the client side are less efficient than letting the database engine handle them. If you post your query we can take a look at how to move the logic there.

In the meantime, I suspect the problem is in your Lookup not returning a value. Try just creating a new filed on your report and setting it's value to just the Lookup value: i.e., make sure that lookup is pulling the correct BLStartDate that you're expecting.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.