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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analisys Issue

Hi All,

I am new in qlikview and facing the issue in my set,

my question is can we get the last year values dynamic based on current year selection or based on other parameter selection.

thanks in advance

Alok Kumar

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to override the selection in FISCALYEAR for the expressions for the previous year. See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

10 Replies
Not applicable
Author

hi

try this

sum( {$<Year = {$(=Only(Year)-1)}>} Sales )

returns the sales for the previous year in relation to the current

selection. Here, a dollar-sign expansion is used to calculate

previous year.

******************************************************

try this

sum(({<Year={$(=max(Year))},

Customer = p({<Year={$(=max(Year)-1)} Customer>}) Sales)

Returns this year’s sales for customers who had sales last year.

senpradip007
Specialist III
Specialist III

Hi alok,

try this:

Sum({<Year = {'$(=Max(Year) - 1)'} >} YourField)

Not applicable
Author

hi try this

sum({<Date={$(prevyear)}>}sales)

Variable:


prevyear=max(year(Date(Datefield,'DD/MM/YYYY'))-1)

jagan
Partner - Champion III
Partner - Champion III

Hi,


Try like this


Sum({<MonthDimensionName=, QuarterDimensionName=, YearDimensionName = {'$(=Max(YearDimensionName ) - 1)'} >} MeasureName)


In the above expressions replace MonthDimensionName, QuarterDimensionName, YearDimensionName with your date fields and if there are anything other that this in your sheet just include those also.  Replace MeasureName with your measure like Sales, Revenue etc.


MonthDimensionName=, QuarterDimensionName=, YearDimensionName= will ignore the selections in this dimensions and always show the full year values even if this values are selected.


Regards,

Jagan.

Not applicable
Author

Hi All.

thanks for your valuable help,

but above all the methods are not working.

even i have tried with same expression of standard Set.

but did not get success.

I am attaching the QVW for your reference.

also note that there are few more parameters are exist into same table based on it we need to give the o/p

jagan
Partner - Champion III
Partner - Champion III

Hi,

What value you are expecting for 2013-14?

Regards,

Jagan.

Not applicable
Author

HI,

I want last year values based on current year selection, and i have also few more parameters which  needs to be added into the t1 table.

Not applicable
Author

Hi All,

Has any one has got solution?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

You need to override the selection in FISCALYEAR for the expressions for the previous year. See attached qvw.


talk is cheap, supply exceeds demand