Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
aarohipatel
Contributor II

Set Analysis Case

Hi All,

I have the following fields in one of my application:

1.YEAR_MONTH

2.ITD_PAID

I am trying to achieve the following case:

If YEAR_MONTH=2016 Then 0 Else Current Year ITD_PAID - Previous Year ITD_PAID.

Please advise

Thanks in advance.

 

2 Solutions

Accepted Solutions
Highlighted
jyothish8807
Honored Contributor II

Re: Set Analysis Case

Hi Aarohi,

The same can be achieved by this expression.

=if(YEAR_MONTH = '2016','0',ITD_PAID - Above(ITD_PAID))

Just make sure you aggregate the data at year level. That mean one entry for each year and sort the table by year.

Please refer the attached.

Best Regards,
KC

View solution in original post

Highlighted
jyothish8807
Honored Contributor II

Re: Set Analysis Case

Hi Aarohi,

 

Try this. Best approach to fulfill your requirement will be to create the fields in the back end.

Best Regards,
KC

View solution in original post

15 Replies
Highlighted
danilostochi
Contributor II

Re: Set Analysis Case

Hi, check this out,

=if(YEAR_MONTH = '2016','0',Above(ITD_PAID))Screenshot_8.png

+55(44) 9 9993-3605, WhatsApp
E-Mail or Skype - danilo16stochi@hotmail.com
Highlighted
jyothish8807
Honored Contributor II

Re: Set Analysis Case

Hi Aaro,

Try this:

=sum(if(YEAR_MONTH = '2016','0',ITD_PAID - Above(ITD_PAID)))

Best Regards,
KC
Highlighted
aarohipatel
Contributor II

Re: Set Analysis Case

Hi Danil,


Sorry for missing part for my requirement.

I need  the sum (ITD_PAID)
If YEAR_MONTH=2016 Then 0 Else Sum(Current Year ITD_PAID)- Sum(Previous Year ITD_PAID).

Sorry once again.

Please advise.

Thank you!

Highlighted
jyothish8807
Honored Contributor II

Re: Set Analysis Case

Hi Aarohi,

Did the solution mentioned above by me worked ? 

Best Regards,
KC
Highlighted
aarohipatel
Contributor II

Re: Set Analysis Case

Hi KC,

Sorry for missing part for my requirement in my initial post.

Like I mentioned to Danil,

I need  the sum (ITD_PAID)

ITD_PAID is an expression (This field is populated with  amounts)


If YEAR_MONTH=2016 Then 0 Else Sum(Current Year ITD_PAID)- Sum(Previous Year ITD_PAID).

Sorry once again.

Please advise.

Thank you!

Highlighted
danilostochi
Contributor II

Re: Set Analysis Case

hi,

see if it is, if not create an example with images.

test.gif

+55(44) 9 9993-3605, WhatsApp
E-Mail or Skype - danilo16stochi@hotmail.com
Highlighted
jyothish8807
Honored Contributor II

Re: Set Analysis Case

Hi Aarohi,

The same can be achieved by this expression.

=if(YEAR_MONTH = '2016','0',ITD_PAID - Above(ITD_PAID))

Just make sure you aggregate the data at year level. That mean one entry for each year and sort the table by year.

Please refer the attached.

Best Regards,
KC

View solution in original post

Highlighted
aarohipatel
Contributor II

Re: Set Analysis Case

HI KC, 

How can I use this new field in a graph with YEAR_MONTH?

Even in the straight table, I cant use this new field calculation if I do not pull 'ITD_PAID'

 

Thanks!

Highlighted
jyothish8807
Honored Contributor II

Re: Set Analysis Case

Hi Aarohi,

Try this.

I just hide the ITD_PAID field in both straight and bar chart.

 

Best Regards,
KC