Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
I need your help to solve this issue.
The segment is a Dimension expression of extraction the first 2 letters from a code
I can not do the same with the PY...
segment | CY | PY |
719 | 770 | |
PO | 142 | 770 |
MD | 55 | 770 |
CA | 205 | 770 |
DE | 75 | 770 |
LO | 59 | 770 |
FA | 87 | 770 |
PA | 11 | 770 |
NR | 7 | 770 |
LU | 44 | 770 |
MG | 13 | 770 |
FO | 21 | 770 |
Thanks
Attached the example:
Your tables all were disconnected and you need to modify your script. Try like below:
Data:
LOAD CODE_CY AS CODE,
[Current Day]
FROM
C:\Users\vera\Desktop\Datos.xls
(biff, embedded labels, table is cd$);
Join(Data)
LOAD CODE_PD AS CODE,
[Previous Day]
FROM
C:\Users\vera\Desktop\Datos.xls
(biff, embedded labels, table is pd$);
Join(Data)
LOAD CODE_PW AS CODE,
[Previous Week]
FROM
C:\Users\vera\Desktop\Datos.xls
(biff, embedded labels, table is pw$);
Join(Data)
LOAD CODE_PY AS CODE,
[Previous Year]
FROM
C:\Users\vera\Desktop\Datos.xls
(biff, embedded labels, table is py$);
So you will get only one table.
Use Dimension: Left(CODE,2)
Expression: Sum(Current_Day) etc
Thanks, the problem is that i can not touch the script. I can just do free analysis...
Thanks
May be this:
=Sum(Aggr(If(Left(CODE_CY, 2) = Left(CODE_PD, 2), [Previous Day], 0), CODE_CY, CODE_PD))
But remember the performance will be very poor because you are essentially creating a Cartesian Product with your Aggr() function.