Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day everyone,
I have a design in my day field, I get day 1, day 2 ............. and day as well as Quarter. Q1,Q2.... and Q
I don't want day and Q in the respectively fields
How do I filter it.
Below is the script I used
LOAD *,
Month(Date) as Month,
WeekDay(Date) as WeekDay,
'Week ' & Week(Date) as Week,
Year(Date) as Year,
'Q'& Ceil(Month(Date)/3) as Quarter,
'Day '& Day(Date) as Day,
Day(Date) as nDay;
Thanks
If you are getting a 'Q' without any number following that probably means some of your dates are not present or proper date. I would look into that issue first. However, to solve it in expression you could try like:
if( Isnum(Date), 'Q')& Ceil(Month(Date)/3) as Quarter,
>>I don't want day and Q in the respectively fields
Then don't add them in your script...
'Q'& Ceil(Month(Date)/3) as Quarter,
'Day '& Day(Date) as Day,
Just omit the textual part like:
LOAD *,
Month(Date) as Month,
WeekDay(Date) as WeekDay,
'Week ' & Week(Date) as Week,
Year(Date) as Year,
'Q'& Ceil(Month(Date)/3) as Quarter,
'Day '& Day(Date) as Day,
Day(Date) as nDay;
I have removed that line of script... 'Q' and 'Day'...
But the Q is now expressed in number ie 1,2,3 and 4 not Q1,Q2,Q3 and Q4
Same can be said of day..
Can I have the quarter expressed as Q1,Q2,Q3 and Q4..
Thank you for your response
I am not sure if I understood you right. And I hope that you have understood what and how it happens when you remove/add 'Q' from/to the expression. If you want the 'Q' to be there for quarter, just leave the 'Q' there like:
'Q'& Ceil(Month(Date)/3) as Quarter,
If I use this line of command: 'Q'& Ceil(Month(Date)/3) as Quarter, I will get the Q,Q1,Q2,Q3 & Q4 include the field
IF I use this line of command: Ceil(Month(Date)/3) as Quarter, I will get 1,2,3 & 4 in the quarter field
Is it not possible for me to get this Q1,Q2,Q3 and Q4 only?
Thanks for your response
If you are getting a 'Q' without any number following that probably means some of your dates are not present or proper date. I would look into that issue first. However, to solve it in expression you could try like:
if( Isnum(Date), 'Q')& Ceil(Month(Date)/3) as Quarter,
Thank you Tresesco