Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
For productions statistics, I would like a table showing stat for a specifc week and the same table with the same stats but for a period going from a specific fixed date to the week selected previously.
For the first table, it's not hard to change form week to week, but for the second one, I'm not able to secify a period of calculation into the parameters of the table.
Let say for example that the stats for Machine A have to be calculated from September 1, how could I write this condition and where?
Thanks a lot!
Vincent
You could create a mapping spreadsheet in excel to map periods to dates, for example:
01/04/2014 Period 1
02/04/2014 Period 1
....
30/04/2014 Period 2
Kasia
You probably can accomplish that with set analysis:
=Sum({<Date=">$(=vPrevDate)">*<Date="<=$(=vCurrDate)">}Stats)
where vPrevDate and vCurrDate is the period for which you want your Stats to aggregate.
Hope this helps.
Tim
I thought about this solution, but I would have to write this in each expression, is it possible to apply this to the whole table instead?
I'm not sure why, but the expression is not working, it's underlined with red, so there is a mistake but I can't find it 😕
Could you post your expression here for us to read and check?
Note: vPrevDate is a variable and $(=vPrevDate) means to use the current value for vPrevDate. If vPrevDate is a field, no $(=) is needed.
Since the expression is using a sum, I removed it because I don't need to use a sum on the whole table, therefore the expressions is not working 😕
Set analysis works only with the aggregating functions. What are you trying to do exactly? Would you be able to give us a masked sample of your data?
I was able to define the start date so this is not a problem anymore. The issue is the final date. It has to be the week selected. Therefore I stored it in a variable so it is easier to use in a expression:
sum({1 <JC_OPE_DATE="<$(=vSemaineSelect)">}OPRE_DUREE)/60
but it doesn't work 😕
The syntax looks correct to me. I suspect the date/week is not properly stored in vSemaineSelect.