Is it possible to create a dynamic reference line based on what filter is selected? I am displaying work hours by employee and there are options for calendar year, calendar month year (Jan-2018) and then calendar week. If they select a year, I want the reference line to be 2080 hours for the calendar year, 160 for the calendar month year, and 40 for the calendar week. Thanks.
Solved! Go to Solution.
I am not sure that this would work. But you could try using GetFieldSelections(filter) and depending on what value is returned set the value to the appropriate number value in your setup for the reference line.
Hopefully that made sense.
I just tested this in one of my apps and it works.
=If (GetFieldSelections(ownerid_Name) like 'Argolo*',1,.5)
You just need to modify this to check your filter field and the values (Year, Month, etc.) and the numeric value that you want the line to show and that should work.
That worked thank you very much, but not totally the way I wanted, so I probably didn't explain myself fully. If I select one of the three filters (Year, Month Year, or Week) the reference line shows up. But if I first select the year, then a month and finally a week, the reference line stays at the year level. I would want the line to change based on the last filter used.
Here is the expression that I used.
=If(GetFieldSelections([Labor Cal Year]) like '201*',2080,
if(GetFieldSelections([Labor Month Year]) like '2017-*' or '2018-*',160,
if(GetFieldSelections([Labor Cal Week]) like 'W*',40)))