Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
muthukumarbalu91
New Contributor II

Sorting Qliksense bar chart in chronological order

Hi,

Kindly help me to sort to show below chart in chronological order of month. In this i am comparing Current year vs last year data.

 

clipboard_image_0.png

 

Normal view giving me the chart in chronological order if i select particular year say 2019, chart alignment is going like above screenshot. Kindly help to fix this.

 

my expression:

Measure 1: Sum({$<ID ={'$(v_ID)'},Year = {'$(vMaxYear)'},Month_Name=,Month_Year=>}value)
Measure 2: Sum({$<ID ={'$(v_ID)'},Year = {'$(vMaxYear-1)'},Month_Name=,Month_Year=>}value)

Thanks in advance.

 

 

3 Replies
Partner
Partner

Re: Sorting Qliksense bar chart in chronological order

How doea the chart sorting property look like? You could try to change it to this expression with ascending  order.

=Only({1}Month)

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
muthukumarbalu91
New Contributor II

Re: Sorting Qliksense bar chart in chronological order

HI  Vegar,

I used expression to sort the month in chronological order but this is working well in normal view.

 

When i filter 2019 data then alignment getting jumpled.

Partner
Partner

Re: Sorting Qliksense bar chart in chronological order

Hmm... it's hard to say without looking at the application. It looks like you are not getting any sort order value for your unsorted months. 

You could try to only sort by last years months by applying your set.

=Only({$<ID ={'$(v_ID)'},Year = {'$(vMaxYear-1)'},Month_Name=,Month_Year=>}Month)

 

If this doesn't work it then my tip is to do the following in order to understand what's going on.

  • Make a copy of your chart 
  • Transform it into a straight table
  • Add your sort order expression as a measure in your table
  • Adjust it so you get a numeric value per row that correspond to your desired sort order
  • Copy this expression back into the sort order for your original chart.

Good luck

Plees ekskuse my Swenglish and or Norweglish spelling misstakes