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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
narender123
Specialist
Specialist

Last 7 days collection??

Hi All,

I want to calculate last seven days collection .I am using the expression like:

=count({<Year={$(=max(Year))},Month={$(=MaxString(Month))},Day={'>=$(=Day(Today()-8))'},Status={'1'}>}PreReleaseNo) //not working

if i uses this

=count({<Year={$(=max(Year))},Month={$(=MaxString(Month))},Day={'>=$(=Day(Today()-7))'},Status={'1'}>}PreReleaseNo)   //working

because today is 8july2013 so it will calculate this month days collection but when i used more than 7 days then it will not calculate because that day fall in the previous month.So it is not calculate the when the days fall into previous month day.

Please Solve this??

Thanks in advance.

Narender

Labels (1)
12 Replies
tresB
Champion III
Champion III

Try this:

=count({<Year=,Month=,Day={'>=$(=Day(Today()-8))'},Status={'1'}>}PreReleaseNo)

narender123
Specialist
Specialist
Author

Thanks Mohit,

My date format is in  MM/DD/YYYY fromat

like this one:

Date={">=$(=Date(Today()-8,'MM/DD/YYYY))"}

Still its not working for 8th days but running for this month days like Today()-7

Thanks.

Any idea??

narender123
Specialist
Specialist
Author

Thanks tresesco .Its not working as it will select all year and all days and giving wrong result.

er_mohit
Master II
Master II

simply try this with sign' > 'or '>='

count(distinct {$<Datefield={">=$(=Date(Today()-8,'MM/DD/YYYY'))"},Status={'1'}>}PreReleaseNo)

or

count(distinct {$<Year=,Month=,Datefield={">=$(=Date(Today()-8,'MM/DD/YYYY'))"},Status={'1'}>}PreReleaseNo)


tresB
Champion III
Champion III

You are right. In that case why don't you try with Date instead of Day? 

jagan
Partner - Champion III
Partner - Champion III

Hi Narendar,

If you date dimension then use this expression

=count({<Year=,Month=,Day=,

DateDimensionName={">=$(=Date(Today()-8,'MM/DD/YYYY'))"},

Status={'1'}>}PreReleaseNo)

Make sure DateDimensionName and Date() has he same date format.

Regards,

Jagan.

narender123
Specialist
Specialist
Author

Hi Mohit.

count(distinct {$<Year=,Month=,Datefield={">=$(=Date(Today()-8,'MM/DD/YYYY'))"},Status={'1'}>}PreReleaseNo)

this expression is working .Is it possible to create dynamic report.

if i select 4th of july 2013

then it will show the

Count of 28jun,29jun,30jun,1jun,2jun,3jun,4jun prerelease no.

??

its really appreciated.

Thanks

narender123
Specialist
Specialist
Author

Thanks Tresesco,

So what i have to do.

if i requirement is that  ,When i select a day like 4july 2013 then it will show

Count of 28jun,29jun,30jun,1jun,2jun,3jun,4jun prerelease no.

means dynamic result .Give me some suggestion please.

Thanks.

narender123
Specialist
Specialist
Author

Thanks Jagan,

So what i have to do.

if i requirement is that  ,When i select a day like 4july 2013 then it will show

Count of 28jun,29jun,30jun,1jun,2jun,3jun,4jun prerelease no.

means dynamic result .

Advice please.


Thanks.