Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have this expression: =Sum({<DebtDays={'123456'}>}TotalDebt) Works Fine:
But in the script I put:
Est:
Load Num_Card_OP,
If(Sum(DebtDays= 123456),TotalDebt) as Estratificacion
resident table1
Group By Num_Card_OP;
Thanks.
They are tries in the past. Now I tried to use just DiasMora. But QlikView Drops an aggregation problem.
Sure, The principal bases contains dates (DiasMora = Debtdate - EndMotnh) So If 20/07/2012 - 31/07/2012 = 11 Days.
So
If(DiasMora = 41060, Dual('Al Día',1), // 41060 its a wired date but means no debt
If(DiasMora >= 1 And DiasMora <=30, Dual('1-30 Días',2))) as Estratificacion // Here would go 20/07/2012-31/07/2012 = 11 Days.
In the final Table my dimmension it would be Estratificacion and my Expression Sum(Deuda_Total)
The final table Would be
estratificacion DeudaTotal
Al Dia 356000
1-30 875441
31-60 554545
and so on.
Hi
You can use like this,
I think , this is one of the way to achieve your requirement..
Load if(DiasMora >= [minimumvalue of datefield]+1 and DiasMora <= [minimumvalue of datefield]+30, Dual('1-30 Días',2))
[minimumvalue of datefield] for example, in textbox give expression like this, Num(min(DateField))
Like wise you can get the value..
Im Sorry I didn't Understand the datafield value. Could You please put an example?
Thank you.
Hi
DiasMora = 41060. is this dateField?
is endmonth by databases. for example 41060 = 31/05/2012 Because de databases is for all may. and so on.
Look the jpg example.
Hi
Ok..Do you know the starting date of your database? You can use like this, MonthStart(Lowest date in your database)
for example 41060 = 31/05/2012
but starting date? MonthStart(date(41060) ) gives 01/05/2012
Like this, which is the starting date? Something like 01/01/2010
I dont have Starting date I have just PeriodoMora(This field) PeriodoMora-EndMonth (41060)= Nº DaysMora (DebtDays)
PeriodoMora-EndMonth (41060) = 41060 means the client desn't have debt. So he is at day.
If debtdays for example is 50 I have to put in > 31 and < 60 and so on. After that I have to build the table with all differents days debt and thouse stratifications for month. because the databases is in Visual Fox pro extension dbf Im creating may.
Hi
Then you simply use,
if(DebtDays > 31 and DebtDays < 60, '31-60 days') like that
Doesn't Work
If(DiasMora = 41060, Dual('Al Día',1)) as Estratificacion
If(DiasMora>=31 And DiasMora <=60, Dual('31-60 Días',3),
if(DiasMora>=31 And DiasMora<=60, Dual('31-60 Días',3),
if(DiasMora>=61 And DiasMora<=90, Dual('61-90 Días',4),
if(DiasMora>=91 And DiasMora<=120, Dual('91-120 Días',5),
if(DiasMora>=121 And DiasMora<=150, Dual('121-150 Días',6),
if(DiasMora>=151 And DiasMora<=180, Dual('151-180 Días',7),
if(DiasMora>=181 And DiasMora<=210, Dual('181-210 Días',8),
if(DiasMora>=211 And DiasMora<41029, Dual('>211 Días',9))))))))))) as Estratificacion
Look Happen some rare When reload the QlikView Al dia = 1651913 (Toooo High)
But when I put in my Expression This:
=Sum({<DiasMora={'41060'}>}Deuda_Total)
QlikView bring me the real value 327347 (The same value that in Excel File). But I dont want the hiugh formula in my expression because QlikView its getting too slow.
Please look up the jpg file.