Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
joshrussin
Creator III
Creator III

Select date ranges as a dimension in table.

I have a pivot table and have been using it in my other apps, but for this specific one, I had to make an inline table with a few types of errors. The table I am working on is the Error Type History sheet. If I have Date_Doc_Rv as a column, it shows all dates. I just need each day for the previous week. Any ideas? Below is my script, attached is my file.

//This is where to add new holiday hours

SET vHolidays = '1/2/2017', '5/29/2017', '7/4/2017', '11/23/2017', '11/24/2017', '12/25/2017', '12/26/2017',

'1/1/2018', '5/28/2018', '7/4/2018', '11/22/2018', '11/23/2018', '12/24/2018', '12/25/2018'

                ;

//Days in Month

Let vDiM = NetWorkDays(MonthStart(Max(Date)), MonthEnd(Max(Date)), $(vHolidays));


LOAD

    Date_DOC_Rv,

    Month(Date_DOC_Rv) as Month_RV,

    Num(Month(Date_DOC_Rv)) as MonthNum_RV,

    Year(Date_DOC_Rv) as Year_RV,

    MakeDate(year(Date_DOC_Rv)) as vCY_RV,

    MakeDate(month(Date_DOC_Rv)) as vCM_RV,

    User_DOC_Rv,

    Area_DOC_RV,

    Reviewed_DOC_RV,

    Errors_DOC_RV,

    Miss_Sig_Date_DOC_RV,

    Inc_Data_DOC_RV,

    Other_DOC_RV,

    Write_illeg_DOC_RV,

    Miss_Paper_DOC_RV,

    Copy_DOC_RV,

    Blank_DOC_RV

FROM [lib://qlikid_nathanguyse/DailyTracker.xlsx]

(ooxml, embedded labels, table is DailyTracker);


Type:

Load * Inline [

Type

Miss_Sig

Blank

Incorrect

Missing

Writeover

Other

];

Doc Control.qvf

3 Replies
vishsaggi
Champion III
Champion III

Hello Joshua,

Will look into this tomorrow morning. I am very sleepy and could not think. Ok.

Thanks,

V.

vishsaggi
Champion III
Champion III

Try this in your Load script and add your Date_Doc_Rv and Prev_Week_Doc_RV_DT fields to check if those dates have previous week dates.

LOAD *, Date(DocRVDt -7) AS Prev_Week_Doc_RV_Dt;

LOAD

    Date_DOC_Rv,

    Floor(Date_DOC_Rv) AS DocRVDt,

    Month(Date_DOC_Rv) as Month_RV,

    Num(Month(Date_DOC_Rv)) as MonthNum_RV,

    Year(Date_DOC_Rv) as Year_RV,

    MakeDate(year(Date_DOC_Rv)) as vCY_RV,

    MakeDate(month(Date_DOC_Rv)) as vCM_RV,

    User_DOC_Rv,

    Area_DOC_RV,

    Reviewed_DOC_RV,

    Errors_DOC_RV,

    Miss_Sig_Date_DOC_RV,

    Inc_Data_DOC_RV,

    Other_DOC_RV,

    Write_illeg_DOC_RV,

    Miss_Paper_DOC_RV,

    Copy_DOC_RV,

    Blank_DOC_RV

FROM [lib://qlikid_nathanguyse/DailyTracker.xlsx]

(ooxml, embedded labels, table is DailyTracker);

joshrussin
Creator III
Creator III
Author

When I put Prev_Week_Doc_RV_Dt it showed all of the data rather than the last seven days. I appreciate you looking into this.