Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amol
Contributor III
Contributor III

Need help with the fiscal year comparison

Hello,

I have a Fiscal Year Data available with me in millions. I want to compare my data in such a manner that the trend in line graph should only show the count from the previous fiscal year. Here my X-axis should be fiscal years and Y- axis should be the count

For example: In the below table: in the fiscal year 2020-2021, 2 orders got repeated from 2019-2020. 

In the fiscal year 2019-2020, 2 orders got repeated from 2018-2019 and so on...

My Dimension is Fiscal Year and I am stucked  with my measure where my line graph should have count of previous fiscal year in this. 

2015-2016 2016-2017 2017-2018 2018-2019 2019-2020 2020-2021
ABCDE MNOPD TRAYL LMNOT TOLON SOLOM
GHIJKL GHIJKL ABCDE ABCDE ABCDE ABCDE
SNOUT LMNOP NOPKE FGHIJ MNOPD LOPQKK
TNOVE TNOVE LMNOP LMNOP LOPQKK LMNOP
SLOTE SUVTW STONE SUVTW SUVTW  
SMNOPE   VTONE KLNOZ    

 

Any help will be really appreciated.

Labels (2)
14 Replies
amol
Contributor III
Contributor III
Author

@joseph_morales Can you please help me with this.

Ksrinivasan
Specialist
Specialist

hi,

you have to convert your data as below 

Ksrinivasan_0-1613150510635.png

 

then your chart will be

Ksrinivasan_2-1613150598016.png

ksrini

 

amol
Contributor III
Contributor III
Author

Hello @Ksrinivasan , 

I am not looking for the above result. I was able to generate that. Here, I want to show the count of the same orders which happend from the previous fiscal year. For example: In the fiscal year 2020-2021:- ABCDE and LOPQKK were the only two orders which were the same from previous fiscal year i.e 2019-2020. So, the count for the fiscal year 2020-2021 should be 2 not 4. 

If you could help me to generate such kind of graph where the count should be of the same entries from the previous fiscal year then it would be really helpful. I want the result as : 2015-2016 ==>6,  2016-2017==>2, 2017-2018==>1, 2018-2019==>2, 2019-2020==>2, 2020-2021==>2.

 

Thank you,

Amol

Ksrinivasan
Specialist
Specialist

hi,

find the script

llll:
LOAD
'Yearr' as Dim,
AA1,
AA2,
AA3,
AA4,
AA5,
AA6
FROM /TEST/SSSS1.xlsx]
(ooxml, embedded labels, table is Sheet16);

Load
Dim,
AA1,
AA1 as AA2,
AA2 as AA3,
AA3 as AA4,
AA4 as AA5,
AA5 as AA6
resident llll
Order by Dim;

Result:

Ksrinivasan_0-1613393354296.png

 

Ksrinivasan_1-1613393415536.png

ksrinivasan

 

 

Ksrinivasan
Specialist
Specialist

hi,

my data

Ksrinivasan_0-1613393544105.png

 

ksrinivasan

amol
Contributor III
Contributor III
Author

Hi @Ksrinivasan ,

 

what if I have data like this:

amol_0-1613394893772.png

 

First column is fiscal year and second column is Orders. 

 

Amol

Ksrinivasan
Specialist
Specialist

hi,

i did with my sample data as you have provide in earlier,

just check my dummy data,

ksrinivasan

amol
Contributor III
Contributor III
Author

Hi @Ksrinivasan ,

 

Yes, I understood. But is it possible if you can provide me the solution where my first row will be fiscal year and second row will be orders. As considering the future perspective, if I consider the above solution provided by you then it won't be an automated process as for the next fiscal year I have to again add the new fiscal year in my code.

 

Amol

amol
Contributor III
Contributor III
Author

Sorry, I mean I have to add AA7 Column for the next fiscal year later.

 

Amol