Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
If you are a Qlik Insight Bot user, join this collaborative group: JOIN GROUP
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)

Tags (1)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Date issue

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
Highlighted
Partner
Partner

Re: Date issue

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

Highlighted
Not applicable

Re: Date issue

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.

Highlighted
Partner
Partner

Re: Date issue

Can you send a sample qvw?

Highlighted
Not applicable

Re: Date issue

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

Highlighted
Partner
Partner

Re: Date issue

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

Highlighted
Not applicable

Re: Date issue

It really helped thank you so much.