Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
i need to populate a date from 1st wendenday of everymonth. means i have my dates like 'Actual Date' Column but i need to derive the date as per 'Required Output' columns. Any help. TIA
Actual Date | Required Output |
30/12/2017 | 6/12/2017 |
15/12/2017 | 6/12/2017 |
3/12/2017 | 6/12/2017 |
3/1/2018 | 3/1/2018 |
1/1/2018 | 3/1/2018 |
17/1/2018 | 3/1/2018 |
1/2/2018 | 7/2/2018 |
20/2/2018 | 7/2/2018 |
Hi Petter,
I think you have to change 9 to 10. Correct me if I am wrong.
Date(MonthStart([Actual Date])+FMod(10-Weekday(MonthStart([Actual Date])),7))
Hi Sampath,
Try,
Date:
Load [Actual Date],
WeekStart(MonthStart([Actual Date]),1,2) as [Required Output]
From
......
You can use this expression:
Date(MonthStart([Actual Date])+FMod(9-Weekday(MonthStart([Actual Date])),7))
try this
Date(
MonthStart("Actual Date")
+ (2 - weekday(MonthStart("Actual Date")))
) as NewDay
Hi Petter,
I think you have to change 9 to 10. Correct me if I am wrong.
Date(MonthStart([Actual Date])+FMod(10-Weekday(MonthStart([Actual Date])),7))
I guess your week for your country settings start on a different day of the week than mine. So it would be 9 for me and 10 for you. However I find tamilarasu's solution much more elegant - I wasn't aware of the WeekStart() function in Qlik....
Ah got it. Thanks Petter. Have a fantastic day!
thanks - you too!
thanks to all for the help