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

Announcements
Mastering Change Data Capture: Read Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Question on Varience

In the list box I have years from 2000 to 2014.

If I select 2012 and 2013 the variance is showing for 2013 but it is showing 0 for 2012.

The logic I implemented is:

=if(RowNo(Total)=1,0,(count(Cloumn1)-above(count(Column1))) / above(count(Column1))

2 Replies
Anonymous
Not applicable
Author

Post your sample app....

Not applicable
Author

Your year keep as variable ( v_year )

apply calculation field as

For current year

if( your_year_field_name=v_year,value_of_field_name,0)

For Previous year

if( your_year_field_name=v_year-1,value_of_field_name,0)

Variance

if( your_year_field_name=v_year,value_of_field_name,0) - if( your_year_field_name=v_year-1,value_of_field_name,0)

Hope your this is solution.