Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
nehasaxena
Creator II
Creator II

How to create Days bucket

Hi All,

I need to display day bucket as X axis in one chart. The chart shows the data to get the info that how much data is pending from how many days (See the image).

Formula to calculate days - Num(EffectiveDate - Today())

Can we create the bucket like in expected image?

Let me know if you need more info.

Thanks.

Best Regards,

Neha

1 Reply
marcus_sommer

You need to create a calculated dimension for it in logic of this:

if(EffectiveDate - Today() <= 1, dual('0-1 days', 1),

if(EffectiveDate - Today() <= 3, dual('2-3 days', 2),

if(EffectiveDate - Today() <= 7, dual('1 week', 3),

  ...

and then as chart-expression something like: count(YourID)

Instead of an if-loop could be also a pick(match()) used or you might transfer it into the script by using Mapping … and not the geographical kind.

- Marcus