Skip to main content
Announcements
Accelerate Your SuccessFuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
vikasmahajan

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 .Financial Year Sort Manually.png

Does any one sort by financial year wise ?

vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
5 Replies
thkarner
Partner - Creator III
Partner - Creator III

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

thkarner
Partner - Creator III
Partner - Creator III

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.

sunny_talwar

How about this

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

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

vikasmahajan
Author

Thanks for reply , No luck Sunny

Financial Year Sort Manually.png

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

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sunny_talwar

Can you create an expression like this

SubField(FinancialYear, '-', 1)

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