Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody. I was working with this dimension, and it was working.
=IF(EndDate-Date <60, PurgeChar(Class(EndDate - Date ,15,'a'),'>=<') , '+ 60')
Now, i have to replace the "EndDate" With this
timestamp(If([(QUANTITY1- QUANTITY2] = 0, Aggr(MAX(AutoDate), CodigoWeb), '-')) (this expresion works in the expression part)
And when i replace this in the calculate dimension it doesn´t works! I doesnt make sense, the sintax is OK
i'll put an example in the QV!
Please help me i´ve been trying to fix it for a long time
Greetings
Ok, when the [(QUANTITY1- QUANTITY2] != 0 i wanna have the "-" This is because the items aren´t delivered yet and there isn´t a finish date. And then i´d put "dont select nulls" (because the client don't wanna see the items that aren´t delivered yet)
Thank you!
Okay, so that should not be summed in that case. Got it. So use my second expression.
Just to clarify, when you type in '-', that does not make the value null, it makes it a string equal to a dash. If you want to truly have it null(), either user null(), or do not add the second parameter to the if statement: if([(QUANTITY1- QUANTITY2], max(Date))
If you don't add a third parameter to the if statement, it automatically sets whats not true to a null value.
Ok man, thank you!
I see now that i dont have the "-" in the second expression.
I have one question but if you prefeer i can´t put it in another thread.
Now i´m groupping by the num_web( is the "primary key" of the table). Should i aggregate by the dates too? because i dont know if the expression is taking the dates when i have 4 or 5 dates in the same num_web
Sory but this expression is a bit too dificult to mee.
Cheers.
Can you post an example of what your data looks like? Just using the fields CodigoWeb, EndDate, and StartDate
In this format:
CodigoWeb, EndDate, StartDate
1, 10/02/2014, 14/02/2014
1, 13/02/2014, 17/02/2014
...
Is that what it looks like? If not, please post an example.
Of course! For example:
CodigoWeb | Fecha | Fecha_Fin |
- | ||
23 | 06/02/2014 | - |
24 | 26/02/2014 | - |
25 | 26/02/2014 | - |
34 | 28/02/2014 | 13/05/2014 |
33 | 28/02/2014 | 13/05/2014 |
27 | 28/02/2014 | 13/05/2014 |
26 | 28/02/2014 | 13/05/2014 |
28 | 28/02/2014 | 13/08/2014 |
29 | 31/03/2014 | - |
30 | 14/04/2014 | 27/05/2014 |
31 | 14/04/2014 | - |
35 | 14/04/2014 | - |
16 | 24/04/2014 | 09/05/2014 |
17 | 24/04/2014 | 15/05/2014 |
18 | 24/04/2014 | 09/05/2014 |
19 | 24/04/2014 | 15/05/2014 |
20 | 24/04/2014 | 27/05/2014 |
21 | 24/04/2014 | 29/05/2014 |
Hmm i don't see any multiple dates for the web. Can you elaborate more on what u mean with "because i dont know if the expression is taking the dates when i have 4 or 5 dates in the same num_web"
Can you show an example of that in your data?
Just to be save, I'd also put min around your Date field as well. If you say there are multiple dates for a CodigoWeb, then you'd probably want the longest stretch between any there. So:
=aggr( if(sum(CantidadAdjuntada) - sum(CantidadEntregada) = 0, if(MAX(AutoDate)-MIN(Date)<60,PurgeChar(Class(MAX(AutoDate)-MIN(Date),15,'a'),'>=<'), 'Mas de 60')), CodigoWeb)
So this will assign a class to the length of time from the min Date to the max AutoDate for each CodigoWeb. If that is what you are looking for
Hope this helps!
Sory i´ve just seen this. I´m proving it now. In this case is the same with or without the MIN.
Thank you. You helped me a lot, Please help me the next time! haha.
If you can, help me with this please