Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello every one,
I am using dual function in load script to sort some values in pivot table using month-Year, the problem is that dual function returns always january as month, this is my script:
DUAL(month(DATEEVENEMENT)&'-'&Date(DATEEVENEMENT,'YY'),Year(DATEEVENEMENT)) AS MONTH_Ev
there is the output:
janv.-19 janv.-20 janv.-21
Note that month(DATEEVENEMENT) works well.
Can anyone help please.
You can only store one text value per numeric in a dual field . You are using year as numeric value for all months and you will get the same text for all 2020 values and all 2021 values etc.
An alternative approach for this could be using this expression.
Date(monthname(DATEEVENEMENT), 'MMM-YY') as MONTH_Ev
Try this.
DUAL(month(DATEEVENEMENT)&'-'&Date(DATEEVENEMENT,'YY'),Month(DATEEVENEMENT)) AS MONTH_Ev
You can only store one text value per numeric in a dual field . You are using year as numeric value for all months and you will get the same text for all 2020 values and all 2021 values etc.
An alternative approach for this could be using this expression.
Date(monthname(DATEEVENEMENT), 'MMM-YY') as MONTH_Ev
Thank you @Saravanan_Desingh for the reply, but that doesn't work,