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

Enabling the expression only for the current year

Hi All,

In a Pivot Table we have given two expression and it is showing for all the years. We want to dispaly the second expression only for the current year (i.e 2012).

Is there any option of doing this. (other than going with the calculated dimension)

I have attached the sample copy of QVW for reference.

Thanks,

Sijo Joseph

1 Reply
christophebrault
Specialist
Specialist

Hi,

I think it's not possible to remove your count expression only for some years. If you use an expression in a pivot chart, it must be used for all dimension.

You can calculate count() only for present year and show null() for other years.

Write this :

if([Processed Year]=year(today()), count(Name))

If you really want to achieve that, use a simple tab and write an expression for each year :

2012 :

sum({$<[Processed Year]={$(=Max([Processed Year]))}>}Sal)

2011:

sum({$<[Processed Year]={$(=Max([Processed Year])-1)}>}Sal)

2010 :

sum({$<[Processed Year]={$(=Max([Processed Year])-2)}>}Sal)

Look at attached file

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin