14 Replies Latest reply on May 9, 2018 8:50 PM by Deepak Rai

# How to do bins in a table

Hello

Looking for guidance on how to do bins in a table(not histogram). Basically I want to show tickets past SLA in columns of 1-5, 6-10 and 10+ as column headers. From the attached sample data it will be grouped by Segment. So for each segment columns showing the count of tickets past SLA. Each record will correspond to a ticket even though I didn't put ticket number in the data, just days past SLA and segment.

• ###### 1. Re: How to do bins in a table

Like This?

Thanks

Deepak

If it Helps, pl mark it Helpful and CORRECT to close Thread

• ###### 2. Re: How to do bins in a table

Yes

Sent from my iPhone

• ###### 4. Re: How to do bins in a table

Hello Deepak

What do you do in the if statement to deal with the records that haven't breached SLA? Say if it days past was 0 from my calculation. Also, it looks like if no records fall in a bin then that bin doesn't display.

• ###### 5. Re: How to do bins in a table

I created 3 bins based upon your logic. Pl have a look at BIN Calc in attached file.

• ###### 6. Re: How to do bins in a table

I am seeing too many records in the first bin. I think it is showing records that aren't past SLA(less than 0). The data I am using isn't the same as the summy data I posted. My steps are.

1. Find days past SLA using 2 dates. So some records may not be out of SLA. Used this calculated field

Days Past SLA

DATEDIFF('day',[SLA Target Date], [Ticket Closed Date]

2. Use this calculated field

Late Days

If [Days Past SLA] >0 Then [Days Past SLA]

ELSE 0

END

For some reason I think it is taking tickets that aren't past SLA and putting them in the 1-5 bin.

• ###### 7. Re: How to do bins in a table

In your dummy data you have these values

All are >0

• ###### 8. Re: How to do bins in a table

Yes. But in my real data I have

49

40

27

0

-4

-7

-14

-15

Etc. it was easier for me to make dummy data on home computer the real data from locked down work computer

Sent from my iPhone

• ###### 9. Re: How to do bins in a table

Modify BIN Calc to:

• ###### 10. Re: How to do bins in a table

That’s the way I had it setup originally. I think it’s putting the -values in the else 10+ column.

Sent from my iPhone

• ###### 11. Re: How to do bins in a table

If [Days Past SLA]>0 and [Days Past SLA]<=5 Then "1-5"

ELSEIF

[Days Past SLA]>=6 AND [Days Past SLA]<=10 THEN "6-10"

ELSEIF [Days Past SLA]>=11 THEN "10+"

END

• ###### 12. Re: How to do bins in a table

0 or less than 0 are under Null. Filter it out

• ###### 13. Re: How to do bins in a table

Thanks Deepak. That's better. Any idea how to get rid of the nulls column and add 0's, If I hide the Null column I lose segments that have no tickets past SLA. I would prefer to see a 0 there like the below screenshot from Excel report

• ###### 14. Re: How to do bins in a table

so using your Same data, I created Bins with Bin Size of  10 and to get the 0 in Place of Blanks, I created a calc Called Measure To get This: