1 of 1 people found this helpful
I've attached another approach which can often be handy - splitting the day into <N> equal sized chunks, where <N> is a parameter.
Very good. This is what was required !!!!
Thanks Jhonathan. This is excellent and is perfect. I have posted another query and I hope you can help me on this as well.I have following data (table). Each item i.e. A, B, C have multiple entries at different times with status.Item Time Status
A 8:01:03 AM Available B 8:02:43 AM Available C 8:02:56 AM Available B 8:05:43 AM Consumed A 8:07:32 AM Consumed C 8:11:42 AM Consumed C 8:12:26 AM Available A 8:15:16 AM Available B 8:21:48 AM Available C 8:24:21 AM Consumed A 8:30:15 AM Consumed B 8:32:32 AM ConsumbedFor Each Item (A, B, C) - I need to find the time difference (in minutes) between item's (each) 'Available' Status and 'Consumed' Status.For Item 'A': Time Difference1 = (8:07:32 - 8:01:03) = 6 minutes and 29 secs [i.e time difference between item A's first consumption and availability)For Item 'A': Time Difference2 = (8:30:15 - 8:15:16) = 14 minutes and 59 secs [i.e time difference between item A's 2nd consumption and availability)The output will be Item A: max (time diff): 14 minutes and 59 secsThe output will be Item A: min (time diff): 6 minutes and 29 secSame is applicable for items B and C.I need urgent help on this.
I don't have time to work on this right now, this kind of calculation can get pretty complicated in Tableau. My suggestion is that you do this as a self-join using your underlying DB or Custom SQL in Tableau, where for each combination of item/time you can find the prior Available time for that item. That way each row in the dataset in Tableau will have the time available and the difference is straightforward to calculate.
I am unable to understand the logic which you used .Could you please elaborate the Content.
DATETIME((INT((FLOAT([DateTime]) -INT(FLOAT([DateTime]))) * [Bins Per Day]) / [Bins Per Day]) +
Also, please explain the concept of Bins Per Day .When I applied the same Logic I m getting incorrect result.
Its happening in my office work data ,so can't share the workbook .