Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jamiemcc
Contributor III
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
sunny_talwar

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

jamiemcc
Contributor III
Contributor III
Author

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) )))

 

 

sunny_talwar

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
Contributor III
Contributor III
Author

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

 

sunny_talwar

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
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

Capture.JPG

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