Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
narayanamsn
Creator
Creator

How to create yearly sales given the quarterly numbers

Hi,

Have a below scenario. I have quarterly sales numbers and and want to get yearly sales as well in the summary table.

I am not allowed to create a column for the year as I am using some functions - Pick , Dim to get the Qtr with Previous Qtr, Quarter with the same Quarter of previous Year comparisons.

Base Data :

 

CodeQtrsales
aQ1'1837
bQ1'1876
aQ2'1899
bQ2'1833
aQ3'1879
bQ3'1842
aQ4'1885
bQ4'1882
aQ1'1727
bQ1'1767
aQ2'1748
bQ2'1756
aQ3'1721
bQ3'1726
aQ4'1769
bQ4'1785
aQ1'1869
bQ1'1845
aQ2'1886
bQ2'1889
aQ3'1886
bQ3'1879
aQ4'1838
bQ4'1835
aQ1'1767
bQ1'1756
aQ2'1753
bQ2'1711
aQ3'1763
bQ3'1722
aQ4'1781
bQ4'17100

Expected table:

 

CodeQ1'17Q2'17Q3'17Q4'17FY17Q1'18Q2'18Q3'18Q4'18FY18
a9410184150429106185165123579
b1236748185423121122121117481

stalwar1

14 Replies
sunny_talwar

Would you be able to share a sample qvw, it will be easier to see and play around with. The problem is that there is not straight forward way to do this and will have to be played around based on the data you have and the sorting you need.

narayanamsn
Creator
Creator
Author

Here is the app..

sunny_talwar

What is the required sorting?

FYs.... then FY with Q?

narayanamsn
Creator
Creator
Author

Capture.PNG

sunny_talwar

Try this

RangeSum(Right(Fiscal_Year, 2), Only({1} Dim)/1e2, FYearMonth/1e10)