Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date issue

Im having some trouble with the report i'm developing. I need to have the year and quarter listbox pre-selected, but whenever any of the quarter is selected, the data for the previous quarter goes missing in pivot table.

I'm not sure if it has something got to do with the script i wrote for the for those expression. Below is the script:

Sum({$<PostingYear={$(=Max(PostingYear)-1)},PQuarter={$(=Max(PQuarter)-1)}>}Amount/1000*-1)

1 Solution

Accepted Solutions
fosuzuki
Partner - Specialist III
Partner - Specialist III

You have to disregard the selection in the field PostingQuarter. So your formula should be:

Sum({$<PostingYear={$(=Max(PostingYear)-1)},PQuarter={$(=Max(PQuarter)-1)}, PostingQuarter=>}Amount/1000*-1)

View solution in original post

6 Replies
fosuzuki
Partner - Specialist III
Partner - Specialist III

What is the content of the field PQuarter? Is it a number from 1 to 4? If you select the first quarter, your set analysis will consider the previous quarter as 0 (zero)...

Not applicable
Author

Yes the contents of the field PQuarter is 1 to 4. But this happens even if i select the fourth quarter. I'm very sure that i have data for all the quarters.

fosuzuki
Partner - Specialist III
Partner - Specialist III

Can you send a sample qvw?

Not applicable
Author

Ok, I have uploaded the sample. Please check the first and last tab for you to compare.

fosuzuki
Partner - Specialist III
Partner - Specialist III

You have to disregard the selection in the field PostingQuarter. So your formula should be:

Sum({$<PostingYear={$(=Max(PostingYear)-1)},PQuarter={$(=Max(PQuarter)-1)}, PostingQuarter=>}Amount/1000*-1)

Not applicable
Author

It really helped thank you so much.