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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
tvisha
Creator II
Creator II

Pivot Buckets not picking for dates.

Hi,

I have created a dimension with buckets as ,

 

=If(num(Date(floor([Date Created]))-Date(today()))<=5,'1-5',
If(num(Date(floor([Date Created]))-Date(today()) )<=10,'6-10',
If(num(Date(floor([Date Created]))-Date(today()) )<=20,'11-20',
If(num(Date(floor([Date Created]))-Date(today()) )<=30,'21-30',
If(num(Date(floor([Date Created]))-Date(today()) )>30,'More than 30 days')
))))

 

I am trying to plot a pivot table, however it is taking just the first bucket and not rest. I have done the same in other apps and it is working fine, not sure why not here.  Am I doing something wrong with the date? Any help. 

 

tvisha_0-1660559014402.png

 

 

 

Also in the measure I am adding the count , as count(case reference number) however it is not coming correct.

or I need to plot a graph something similar, 

tvisha_1-1660559095951.png

 

 

Any other help way I can create this?

Thanks,

Rains

 

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

Assuming [Date Created] is something that happened in the past, [Date Created] - Today() is always going to be a negative number, so it follows that you will only ever get the first bucket - negative numbers are always smaller than 5. If this is indeed the case, you need to reverse either your subtraction or your if() statements accordingly.

View solution in original post

3 Replies
Or
MVP
MVP

Assuming [Date Created] is something that happened in the past, [Date Created] - Today() is always going to be a negative number, so it follows that you will only ever get the first bucket - negative numbers are always smaller than 5. If this is indeed the case, you need to reverse either your subtraction or your if() statements accordingly.

tvisha
Creator II
Creator II
Author

Thank you, That worked. Silly mistake. I rectified that in other calculation, but missed here.

tvisha
Creator II
Creator II
Author

IS there a way I can plot a bar graph from the same?