# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Honored Contributor III

## how to sort Financial Year in Qlik sense manually by expression

Hi All,

I manage sorting for months & Quarters by expression in qlik sense using following expression

if( \$(vSalesView) = 1, MonthNumber,if(\$(vSalesView) = 2,Match(Quarter,'Q1',  'Q2', 'Q3', 'Q4'),

if(\$(vSalesView) = 3,FinancialYear)))

But for financial year chart is not sorting .

Does any one sort by financial year wise ?

vikas

5 Replies
Contributor III

## Re: how to sort Financial Year in Qlik sense manually by expression

Hi,

the question is which chart type you want to use. In your case obviously a bar chart.

The sorting is done automatically in case the field (e.g. YearQuarter, YearMonth) is a field of type dual.

This dual field has 2 representations, a text and a corresponding number, which is used for sorting.

If your want to use the continous time line in the line chart you should care for a proper calendar which supports the fiscal year also. In this case you can read my article for details.

Derived Calendar Fields

Contributor III

## Re: how to sort Financial Year in Qlik sense manually by expression

In this article you´ll also find in the chapter "Support for Fiscal Years?" how the Dual-Fields could be defined to support fiscal year representation.

MVP

## Re: how to sort Financial Year in Qlik sense manually by expression

if( \$(vSalesView) = 1, MonthNumber,if(\$(vSalesView) = 2,Match(Quarter,'Q1',  'Q2', 'Q3', 'Q4'),

if(\$(vSalesView) = 3, SubField(FinancialYear, '-', 1))))

Honored Contributor III

## Re: how to sort Financial Year in Qlik sense manually by expression

Thanks for reply , No luck Sunny

my dimensions  =Pick(Match(\$(vSalesView),1,2,3),MonthName,Quarter,if(FinancialYear>=N_FinancialYear,FinancialYear ))

Measure

num( sum({<COMPANY={'ABCD'},Created_on_Flr={'>=\$(=vCutOffDate3)'},FinancialYear=>} VolKL)/\$(vDivide)

Can't share qvf since this is client data.

I want sorting on x axis.

Thanks

Vikas

MVP

## Re: how to sort Financial Year in Qlik sense manually by expression

Can you create an expression like this

SubField(FinancialYear, '-', 1)

where you have FinancialYear as Dimension and share an image of the table?