Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show only current week

I have a large set of project data with project event START DATES and END DATES. I want a table to only show the activity/events within the current week. What would be the expressions to capture this view?

6 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

=Sum({<StartDate={'>=$(=WeekStart(Today()))<=$(=Today())'}>} MeasureName)

Hope this helps you.

Regards,

Jagan.

maksim_senin
Partner - Creator III
Partner - Creator III

Hi,

Another option is to create a flag attribute in the table in your load script which would equal to 1 for current week:

[

YouNewTable:

LOAD *,

if(StartDate>=WeekStart(Today()), 1, 0) as CurrentWeek

FROM YourTable;


DROP YouTable;

]

Best regards,

Maxim

Not applicable
Author

Thanks Jagan.

Works great.

1. How would alter this to only show current day activity vs. the entire week?

2. How would I exclude specific data elements from a table?

Thanks for the help. Obviously, my skills are rudimentary at this stage.

Robert Lakin

jagan
Partner - Champion III
Partner - Champion III

Hi,

For Current date use below expression

=Sum({<StartDate={'$(=Today())'}>} MeasureName)


You can exclude specific elements by using -=


Sum({<Region-={'Asia'}>} Sales) - This will exclude Asia from the Region.


HOpe this helps you.


Regards,

Jagan.

Not applicable
Author

How would I display the rolling 7 days? Current day + 7 future days only of data?

jagan
Partner - Champion III
Partner - Champion III

=Sum({<StartDate={'>=$(=Date(Max(StartDate)-6))<=$(=Max(StartDate))'}>} MeasureName)


Make sure that StartDate and Today() are in same format.


Check this link for similar type of expressions for different scenarios.


Also if you got Answer close this thread by giving Correct and Helpful answers to the posts which helps you in getting the answers.


This helps other in getting the answers easily.


Regards,

Jagan.