Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello !!
I have a attached table as below :
My question is I want the column "SalesPeriodYearMonth" format become to Year + Month Name
For example : the expected result should be become "2022 Oct" instead of "202201
In my custom months sequences should be like this as below :
Do you know how should I do this please? Thank you very much in advance. Cheers!
hi @kiansin
The SalesPeriodYearMonth is in string format. first you need to interpret it as Date using date# function then you can represent it in any format using Date function.
example:
Load
Date(Date1,'YYYY MMM') as Date1 // here you can use any format
;
Load
Date#(Date1,'YYYYMM') as Date1 //This will interpret the first 4 digits as year and the next 2 digits as a month.
;
Load * Inline [
Date1
202201
202202
202203
202204
];
result:
note: as we are not supplying any date here. if you try to display date by default it is 1. like 2022 Jan 01
Hi there,
I would just join your period table to your month field in the data and the you can just order by expression and choose the period field.
Hi there,
Can you provide me the script of your solution please ?
Hi there,
Do you know how to sort it by sequence for the "NewDate1"?
For example : The sequence should be 2021 Oct , 2021 Nov , 2021 Dec, 2022 Jan , 2022 Feb, 2022 Mar and so on.