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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

[ASK] how to make a group of days?

hello..

i have a problem with grouping days

if i want to group days by 7days pergroup, i'll easyly use week(date)

but how to make group that contain 3days pergroup ?

thx...

13 Replies
Not applicable
Author

Hi,

Please find the attached document.This is as per my undersatnding of the problem.

Regards,

Ravi

Not applicable
Author

Hi,

if you can change data (if you can do your own load):

Have you tried intervalmatch?

--> see HOW-TO: Get rid of Synthetic key with Interval Match

Regards

Martin

Not applicable
Author

Hi Martin,

Can u please elaborate what do wanna suggest.

Not applicable
Author

Hi,

see attached file.

Maybe this can help you.

I think You can also generate (autogenerate) the Intervals,

but for the idea this should help!

Regards

Martin

johnw
Champion III
Champion III

This depends a lot on what you mean by a three day group. Here are some possibilities.

  • class(Date,3) // assigns an integer range to the group
  • floor(Date/3) // Just assigns an integer to the group
  • date(floor(Date/3)*3) // Uses the first date of the group
  • date(floor(Date/3)*3)&'-'&date(floor(Date/3)*3+2) // Displays a date range, but it's just text
  • dual(date(floor(Date/3)*3)&'-'&date(floor(Date/3)*3+2),date(floor(Date/3)*3)) // Displays a date range, has underlying date value

If nothing that anyone has posted yet answers your question, you'll probably need to explain the question better.

Not applicable
Author

@martin

hello martin..

ur statement is right like i wanted

but i need it to autegenerate-able

how to do that ?

thx..

@John

hi john..

i use =date(floor(mst_date/3)*3) and it is a wonderful result, just like i wanted

but how to skip null date and sunday?

example, sometime when i click to first date of group, it only show one day because the two next days are nulls

i want the function to read the next available day

how to do that?

thx..



Not applicable
Author

[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/2703.airinti_2D00_sample.rar:550:0]

hello..

i've attached the file

maybe it will help to discuss

many many thx...

Not applicable
Author

@Ravi

hi ravi..

when i looked at ur sample, the date of qroup isn't in an order

it looks random when i click to one of interval

thx..

Not applicable
Author

please i need a hand...