Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can you please help me out with the below discussed issue(YTD).

Hi,

This is Varun.

I Have a requirement(YTD), where I need to display present year data and previous year data.Below is my sample data as well as required data.

Sample Data:

          Customer_id           Year                    Amount

                1                         2007                 100

                2                         2007                 200

                1                        2006                  300

               3                         2006                  400

If I select  Customer_id, then it should show the corresponding data. 

Required Data:

Customer_id         Present_Year                          Previous_Year                  Amount    

      1                                2007                                 2006                           400

      2                               2007                                   -                                200

      3                                 -                                        2006                         300

Can anyone please help me.

Thanks & Regards,

Varun Reddy Kancharla

5 Replies
its_anandrjs

For previous year you can use

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

For current year

=Sum( {<Year =  {'$(=Max(Year))'} >} Amount)

abhaysingh
Specialist II
Specialist II

for max  Year

=sum({<Year = { '$(=MaxYear)'}>}amount)

Previous Year

=sum({<Year = { '$(=MaxYear)-1)'}>}amount)

Not applicable
Author

Hi Abhay,

Thanks for your reply.My requirement is to obtain sum(amount) between (Present-Year-To-Date and Previous-Year-to-date) using straight table. Can you please help me out.

Thanks & Regards,Varun

Date: Sat, 12 Jul 2014 01:19:04 -0400

From: qcwebmaster@qlikview.com

To: varunreddykancharla@outlook.com

Subject: Re: - Can you please help me out with the below discussed issue(YTD).

Qlik Community

Can you please help me out with the below discussed issue(YTD).

reply from Abhay Singh in New to QlikView - View the full discussion

for max Year

=sum({}amount)

Reply to this message by replying to this email, or go to the message on Qlik Community

Start a new discussion in New to QlikView by email or at Qlik Community

Following Can you please help me out with the below discussed issue(YTD). in these streams:

Inbox

© 1993-2014 QlikTech International AB

Copyright & Trademarks | Privacy | Terms of Use | Software EULA

Not applicable
Author

Hi Anand,

Thanks for your reply.My requirement is to obtain sum(amount) between (Present-Year-To-Date and Previous-Year-to-date) using straight table. Can you please help me out.

Thanks & Regards,Varun

Date: Sat, 12 Jul 2014 01:09:05 -0400

From: qcwebmaster@qlikview.com

To: varunreddykancharla@outlook.com

Subject: Re: - Can you please help me out with the below discussed issue(YTD).

Qlik Community

Can you please help me out with the below discussed issue(YTD).

reply from anand chouhan in New to QlikView - View the full discussion

For previous year you can use

=Sum( {} Amount)

Reply to this message by replying to this email, or go to the message on Qlik Community

Start a new discussion in New to QlikView by email or at Qlik Community

Following Can you please help me out with the below discussed issue(YTD). in these streams:

Inbox

© 1993-2014 QlikTech International AB

Copyright & Trademarks | Privacy | Terms of Use | Software EULA

MK_QSL
MVP
MVP

Like this?