5 Replies Latest reply: Dec 7, 2013 11:54 PM by Vani Gade RSS

    Adding Rows for Each Day

      Hi,

       

      I have a table which has two columns.

      1) Date

      2) ID

      For some days the ID's are missing. I want to add rows to the missing Days. I am using this formula, but it is not working. Not sure what the issue.

       

      MinMaxDate:

      Load Min(Date__Id) as MinDate, Max(Date__Id) as MaxDate resident Fact;

      Let vMinDate = Peek('MinDate',-1,'MinMaxDate') - 1;

      Let vMaxDate = Peek('MaxDate',-1,'MinMaxDate') ;

      Drop Table MinMaxDate;

      Join (Fact)

      Load Date(recno()+$(vMinDate)) as Date__Id Autogenerate vMaxDate - vMinDate;

       

      Class:

      NoConcatenate Load Date__Id,

      If( IsNull([Class__Id] ),peek([Class__Id] ), [Class__Id]  ) as [Class__Id]

      Resident AccountFact

      group by [Class__Id] , Date__Id

      Order By [Class__Id] ,Date__Id  ;

       

      Any help?

       

      Thanks.