Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

berryandcherry6
Contributor II

Sorting issue in line graph in Qliksense

Hi,

i have a graph which shows data for last 8 weeks, with

Dimension: Week

Expression: Count(Invitation)

Here i need to display graph to show data with order of week in ascending order. Currently week is jumbled. How to sort it in week order.

I have made all to auto sorting in Sorting Tab of Qliksense.

1 Solution

Accepted Solutions
vinieme12
Esteemed Contributor II

Re: Sorting issue in line graph in Qliksense

See updated APP

created a variable

MaxWeekStart = WeekStart(Max(CanonicalDate)-56)

and used this variable in your expressions

19 Replies
vinieme12
Esteemed Contributor II

Re: Sorting issue in line graph in Qliksense

change to custom sorting >>> sort by Expression = Week(Datefield)

sureshqv
Esteemed Contributor III

Re: Sorting issue in line graph in Qliksense

or else you can create an  inline load for weeks  and you can use in front end,

or

try to create a calculated dimension to get the output.

check below link for your u.standing

Sorting by week number | Qlik Community

berryandcherry6
Contributor II

Re: Sorting issue in line graph in Qliksense

Thanks for Reply!

In script i have maintained canonical date as below

LOAD

    Date(CanonicalDate, 'MM-DD-YYYY') AS CanonicalDate,

    Year(CanonicalDate) AS Year,

    date(WeekStart(CanonicalDate), 'MM-DD-YYYY') &' - '& date(WeekEnd(CanonicalDate), 'MM-DD-YYYY')  as Week_Group_Year,

Load Date(MinDate + IterNo() -1 ) AS CanonicalDate While (MinDate + IterNo() - 1) <= Num(MaxDate);

and using Week_Group_Year as dimension in front end.

What i need to add to make it to display in order.

berryandcherry6
Contributor II

Re: Sorting issue in line graph in Qliksense

Hi Vineeth,

Thanks for reply!

what is Datefield?

sureshqv
Esteemed Contributor III

Re: Sorting issue in line graph in Qliksense

May be try this expression

='Week'&Ceil(Day(the_date)/7)

Highlighted
silambarasan130
Contributor II

Re: Sorting issue in line graph in Qliksense

Hi Supriya,

Could you please share your sample data or show how the week column is look like.

Thank you.

berryandcherry6
Contributor II

Re: Sorting issue in line graph in Qliksense

No, its not working.

This is what i am doing in steps:

Step1: This shows all the datas

Chart1.PNG

Step2: Now i limit it to show last 8 weeks, so limiting it to 8. Where chosen sorting to auto

Chart2.PNG

Here as you can see its not even showing latest values.

I have attached qvf file of my sample please refer it.

berryandcherry6
Contributor II

Re: Sorting issue in line graph in Qliksense

Hi Silambar,

Please find below attached qvf file.

In that i need to display latest 8 weeks data, but in there its all jumbled.

silambarasan130
Contributor II

Re: Sorting issue in line graph in Qliksense

Hi,

Please find the application. This is what you expected right.

Community Browser