Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to add 10 different values to each day that only have the value ’00:00:00’ in another field (KLOCKANST)
The values is the same as you see in field "BOLAG" (Bolag02,Bolag04,Bolag,10 ...)
I add the dates that were missing and '00:00:00' in two fields highlighted in yellow. There is a lot of them.
SlaMigg:
LOAD
BOLAG,
DATUMST,
KLOCKANST,
DATUMOP,
KLOCKANOP,
Timmar,
Orsak;
SQL SELECT *
FROM "SLA_MIGG".dbo.Rapportunderlag
WHERE DATUMST >= '2013-03-31' ;
MinMax:
Load
Min(DATUMST) as MinDate,
Max(DATUMST) as MaxDate
resident SlaMigg;
LET vMinDate = Num(Peek('MinDate', 0, 'MinMax'));
LET vMaxDate = Num(Peek('MaxDate', 0, 'MinMax'));
Drop Table MinMax;
Join (SlaMigg)
Load Date(recno()+$(vMinDate)) as DATUMST Autogenerate vMaxDate - vMinDate;
Migg:
NoConcatenate Load DATUMST,
If( IsNull( KLOCKANST ),'00:00:00', KLOCKANST ) as KLOCKANST,
If( IsNull( KLOCKANOP ), '00:00:00', KLOCKANOP ) as KLOCKANOP,
BOLAG,
DATUMOP,
Timmar,
Orsak
Resident SlaMigg
Order By DATUMST ;
Drop Table SlaMigg;
the
I never solved the problem in qlikview. I change the data in SQL instead
It really seems correct .
Can you explain in more words.
Hi
There was no data in Slamigg for those two dates, so all fields other than DATUMST where null after the Join. Your If(IsNull()) logic puts in default values for the KLOCK* fields, but you have not supplied defaults for BOLAG and the other fields when they are null.
HTH
Jonathan
OK, but it isn´t
As you can see I add dates that were missing highlighted in yellow
But I have nothing in the "BOLAG" field. As you can see I need ten differet values for the same date
I can add one BOLAG value
IF (IsNull (BOLAG), 'Dummy', BOLAG) as BOLAG
But I want all BOLAG values fore each day; Bolag02, Bolag04 ....
I never solved the problem in qlikview. I change the data in SQL instead