Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community, im trying to resolve the following expression.
I have this table
product | op | time_start | time_end |
---|---|---|---|
A | 122 | 8:30 | 17:30 |
B | 123 | 9:00 | 11:00 |
C | 124 | 11:20 | 13:50 |
D | 125 | 13:40 | 14:10 |
what i need is the PROM value (in hours) between all time_end and time_start, columns, in this case:
A --> 9 hours
B --> 2 hours
C --> 2,5 hours
D --> 0,5 hours
PROM: 3,5 hours
thanks
gerardo
I have example for you.
I hope that it helps.
regards
Darek
Take
Dimension:- Product
Expression:- time(time_start-time_end)
Sorry Dariusz, i couldn't open the file.
Could you please write the expression here?
thanks
script:
LOAD product,
op,
time_start,
time_end
FROM
(ooxml, embedded labels, table is data);
dimension: product
expression:
Time( sum(time_end-time_start))
Hi Anand, the problem is that i need to select at least one OP value. If i select only a Product the value is null.
thanks
Thanks for your answer Dariusz, the problem is that i need to include the dimension Product in the expression, if not some times the value is NULL. For example when no values (products or op) are select.
is it clear?
thanks
This is why you should always share your sample data with those kind of questions....
if you remove the dimension product in your example, this expression works?
now it works