Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi -
This is a simple question, with I hope a simple answer. I have a Master Calendar with a Trade_Calendar_Quarter column. It is 1, 2, 3, or 4 depending upon in which quarter the date falls. I can create a list box with that column in it, and it shows 1, 2, 3, and 4, as expected. I wanted it to look nice, so I made it an expression:
='Q' & Trade_Calendar_Quarter
With that as the expression, it shows Q, Q1, Q2, Q3, and Q4. The Q is grayed out, as it is not possible.
So the question is really two questions: why does that happen, and how can I not have the Q show up?
Blair, try the Dual function.
i.e.: Dual('Q' & Trade_Calendar_Quarter,Trade_Calendar_Quarter)
Best regards
You have hide excluded in properties of that list box if you don't want to show Q .
It was not showed you just made an expression at front end .
Hi,
Use this in your master calendar:
Ceil(Month(DateField)/3) AS Quarter,
Best regards.
=if(len(trim(Trade_Calendar_Quarter))=0, null(), 'Q' & Trade_Calendar_Quarter)
I'm afraid I've tried that, and it doesn't work.
Try to follow Oswaldo reply that might work .
This does work, but it seems very strange that if there are no values in the calendar for that column other than 1, 2, 3, and 4 that it would be necessary. Why does concatenating the 'Q' seem to create a 'new' value?
This would just give me 1, 2, 3, and 4. I already have that. It's the concatenation of 'Q' that is causing the problem.
Hi,
I suggest extract Quatrer from a valid Date Field (no nulls) to make sure get correct data if you have nulls, specify a number like a default value ( if(isnull(MyField),1,MyField) ) and use it in your formula.
Something like this:
Ceil(Month( if(isnull(MyField),1,DateField) )/3) AS Quarter,
or
Q & '-' &if(isnull(QuarterField),1,MyField) as Quarter
Best regards.
The second expression works. However, so does just this:
'Q-' & Trade_Calendar_Quarter as Quarter
Why does this work in the load script but not in the expression on the list box? Why does the list box seem to introduce a null/empty value that isn't really there?