Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
arusanah
Creator II
Creator II

Date Help

Hi ,

I have a monthYear field coming from master calender as num.

Date(monthstart(TempDate), 'MMM-YYYY') AS MonthYear,

while as I used following expression in my Data source to generate monthYear field .

Month(date#(MTH,'MMM'))&'-'&YR as MonthYear, this one comes as text

I tried using num in my datasource expression but it converts it to num .

how can I make my second expression to match my master calendar type.

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Date(MonthStart(Date#(Month(date#(MTH,'MMM')) & '-' & YR, 'MMM-YYYY')), 'MMM-YYYY') as MonthYear

or this (simpler version of the above)

Date(MonthStart(Date#(MTH & '-' & YR, 'MMM-YYYY')), 'MMM-YYYY') as MonthYear

View solution in original post

2 Replies
sunny_talwar

May be this:

Date(MonthStart(Date#(Month(date#(MTH,'MMM')) & '-' & YR, 'MMM-YYYY')), 'MMM-YYYY') as MonthYear

or this (simpler version of the above)

Date(MonthStart(Date#(MTH & '-' & YR, 'MMM-YYYY')), 'MMM-YYYY') as MonthYear

arusanah
Creator II
Creator II
Author

Thanks Sunny!!!