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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month and Quarter Selection not being ignored

Hello:

I have the following expression in which I'm trying to get the prior years revenue at the same point in time as this year. (i.e today is Apr. 23 2011 so I want to see the revenue for last year up to the end of March 2010 for the prior year).

If I take MONTHSORT={'<=$(vPriorPeriod)'} out of the expression below both month and quarter selections that the user can make are ignored but I need this in the expression to get the required dollar values/time period.

I'm new at QlikView and this is my first post so I apolgize in advance if this is a silly question.

My expression:

Money (Sum({$<SCENARIO={'Actual'},GRPCOD={140},MONTH=,QUARTER=,FSCSYR={$(vPriorYear), MONTHSORT={'<=$(vPriorPeriod)'}>} MONTHAMT * -1)

11 Replies
SunilChauhan
Champion II
Champion II

use below code

Money (Sum({$<SCENARIO={'Actual'},GRPCOD={140},

FSCSYR={$(vPriorYear),MONTHSORT={'<=$(vPriorPeriod)'}>} MONTHAMT * -1)

hope this helps

Sunil Chauhan
Not applicable
Author

Thanks for the quick reply but I used your suggestion but with a slight modification as I was getting a syntax issue but it's still not ignoring the Month and Quarter selections.

money (Sum({$<SCENARIO={'Actual'},GRPCOD={140}, FSCSYR={$(vPriorYear)},MONTHSORT={'<=$(vPriorPeriod)'}>} MONTHAMT * -1))

SunilChauhan
Champion II
Champion II

money (Sum({$<SCENARIO={'Actual'},GRPCOD={140}, FSCSYR={$(vPriorYear)},MONTHSORT={"<=$(vPriorPeriod)"},MONTH=,QUARTER=>} MONTHAMT * -1))

Sunil Chauhan
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Check with this

    

Money (Sum({$<SCENARIO={'Actual'},GRPCOD={140},MONTH=,QUARTER=,FSCSYR={$(=vPriorYear)},MONTHSORT={"<=$(=vPriorPeriod)"}>} MONTHAMT * -1))

Celambarasan

Not applicable
Author

Thanks again... I tried that already but gave it a try once more using your code but it's still not ignoring the selections of Quarter and Month.

SunilChauhan
Champion II
Champion II

can you share sample file.

Sunil Chauhan
d_pranskus
Partner - Creator III
Partner - Creator III

Hi

To ignore a selection in a field just use it's name without equal (=) sign.

(Sum({$<SCENARIO={'Actual'},GRPCOD={140},MONTH,QUARTER,FSCSYR={$(vPriorYear), MONTHSORT={'<=$(vPriorPeriod)'}>} MONTHAMT * -1)

Cheers

Darius

Not applicable
Author

Thanks for your responses everyone... this is a great community.

I've attached sample file. In order to see the issue you must select the year 2012 as I have a conditional if statement which only uses the problem expression as mentioned above.

Thanks Again!

d_pranskus
Partner - Creator III
Partner - Creator III

Hi

But you have a set condition MONTHSORT={"<=$(vPriorPeriod)"} which is calculated to previous month of max selected months. If you comment it out the expression will not be sensitive to selection

Darius