Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

jamiemcc
New Contributor III

Im trying to do a Calculation of the Last 8 weeks for a task report .

Hi Guys,

 

Im trying to do a Calculation of the Last 8 weeks for a task report .

Im using-

if(floor(TaskDate) > (floor(WeekStart(Today())) - 56),-1,0) as Last8WeeksFlag,

Can anyone see an issue with this as i am having issues receiving the Data.

Thanks. 

Labels (1)
7 Replies

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

Does it error out or does it give an incorrect output for the flag?

jamiemcc
New Contributor III

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

It Pulls up no data. It Gives No error.

The Following Dimension is on Measure for Top Buttons.

 

//if(vToggleTask = 1, sum({<Last8WeeksFlag = {1}>}TaskCount),
// if(vToggleTask = 2,sum({<Last8WeeksFlag = {1}>}TaskCount*Multiplier),
// if(vToggleTask = 3,sum({<Last8WeeksFlag = {1}>}TaskCount*TimeMultiplier) )))

 

 

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

Without going into the expression... do you see a value of 1 for the Last8WeeksFlag in a list box? also, when you select last 8 weeks date within TaskDate to see if Last8WeeksFlag only shows 1?

jamiemcc
New Contributor III

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

I changed the Dimension Value to Zero.

I am now getting back Data for every week. I only want the last 8 

When i filter in Last8WeeksFlag filter it shows values of 0 and -1

 

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

I don't think I follow you completely. Is the flag which you think is the problem or is it the expression or something else? Would you be able to share a sample for us to see the issue?

jamiemcc
New Contributor III

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

Capture.JPG

Here you can see Every Task week on the left Selected 1 through to 52 . I only want the Last 8 selected. 

jamiemcc
New Contributor III

Re: Im trying to do a Calculation of the Last 8 weeks for a task report .

Capture.JPG

Here you can see Every Task week on the left Selected 1 through to 52 . I only want the Last 8 selected.