Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dates between monthend and last weekend

Colleagues, good day!

I'm working now with fetching dates between every monthedns and the last weekend of the month.

What i need?

i have one calculated dimension:

=If(WeekEnd([Date])>=MonthEnd([Date]), MonthEnd([Date]),WeekEnd([Date]))

which set monthend only if dates are between monthend and last weekend.

Task - to set here 1.

6.jpg

I've already tried such expr as:

if(Date>=

max(total <month(Date)&year(Date)> weekend(Date))

and Date<=monthend(Date)

)

But it doesn't work.

Have anyone idea how to fetch this?

Thanks. ! !

5 Replies
Anil_Babu_Samineni

May be I have one free idea for you, because within TOTAL keyword calculators won't work

Create one field in script

Month(Date)&year(Date) as monthyear

And expression is similar to this, and remind you date format should be same when we ate working for equal sign

if(Date>=

max(TOTAL <monthyear> weekend(Date))

and Date<=monthend(Date), firstargument,secondargument

)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Thanks, dear!

I checked it, but it shows the same date for all dates (takes the max of the year)

7.jpg

Anil_Babu_Samineni

If you use only max(TOTAL ...) always give maximum date only. And, in your expression heading it shows the same and you May need to use the if..else.. where I gave

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

yes, but in this case i always with compare dates with max weekend date of the calendar.

Anil_Babu_Samineni

The reason I am replying, I am not opening your application due to software is not installed in my machine.

If(date = max(total calendardate),1,0) ..

If you need this, you can comparing using compound flags into the variable component

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful