Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Help me please!!!!..... I want to put this expression into the script.
Sum({<KARFECHA={"<=$('$(=MAX(KARFECHA))')"}>} Cantidad_Saldo)
May be try below not sure if this is works, if not can you send some sample data with and example output.
LOAD *
FROM Tablename;
NoConcatenate
MaxLoad:
LOAD DimKeyField,
IF(KARFECHA <= Max(KARFECHA), Cantidad_Saldo) AS CantidFlow_Flag
Resident YouractualTable
Group By DimKeyField;
LEFT JOIN(MaxLoad)
LOAD DimKeyField,
Sum(CantidFlow_Flag) AS SumField
Resident MaxLoad
Group By DimKeyField;
Left Join(YouractualTable)
LOAD *
resident MaxLoad;
Drop Table MaxLoad;
Qlik preferred to use in Design level logic, If too luck complexity involved !! What is the purpose, you are going to back to the script Instead in Design?
A front end expression is evaluated in some context - for example, a text object (no dimensions), a table (with some set of dimensions), and so on. To evaluate this in script, you would need to understand this context.
You can use a pattern like this:
T_Max: LOAD MAX(KARFECHA) as maxFecha Resident ... Let vMaxFecha = Peek('maxFecha'); ... Fact2: LOAD ... Sum(If(KARFECHA <= $(vMaxFecha), Cantidad_Saldo)) as Result, ... Resident ... Group by ... ... Set vMaxFecha =; DROP Table T_Max;
Thanks,
I have a problem, the sum is not performing correctly for all dates:
VEHCHASIS | Result | MVESUFIJO | =Aggr(Sum(Cantidad_Saldo),VEHCHASIS) |
JTMZD9EV6E5014970 | 0 | AA | 1 |
JTMZF9EV1ED022040 | 0 | AA | 1 |
JTDKD3B35F1567880 | 1 | AA | 1 |
5YFBU9HE7FP142104 | 1 | AA | 1 |
4T1BB3EK0AU118666 | 1 | AA | 1 |
The actual values are those of the last column