
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dual function
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.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Qlik Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this.
DUAL(month(DATEEVENEMENT)&'-'&Date(DATEEVENEMENT,'YY'),Month(DATEEVENEMENT)) AS MONTH_Ev

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Qlik Community MVP

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @Saravanan_Desingh for the reply, but that doesn't work,
