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

Sort in the stack bar

Hi all,

I m facing a issue on my stack bar that inside value segments are not sort from low to high.

I've attached the qvw file.

please help me on ythis issue

7 Replies
MarcoWedel

Hi,

maybe like this?:

QlikCommunity_Thread_191499_Pic1.JPG

hope this helps

regards

Marco

manoranjan_d
Specialist
Specialist
Author

Many thanks macro, but using calculated dimension it will cause  complexity issue, so this calculated dimension  can be return in load script and then we can the field name in dimension?

MarcoWedel

Hi,

one solution to create the rank within the script could be:

QlikCommunity_Thread_191499_Pic2.JPG

QlikCommunity_Thread_191499_Pic3.JPG

table1:

LOAD Count,

    Type,

    Country,

    [Data source]

(ooxml, embedded labels, table is Sheet1);  

table2:

LOAD Sum(Count) as SumCount,

    Type,

    Country,

    [Data source]

Resident table1

Group By Type, Country, [Data source];

Left Join (table2)

LOAD Distinct

    Type,

    Country,

    [Data source],

    AutoNumber(RecNo(),Type&'/'&Country) as RankDataSource

Resident table2

Order By Type, Country, SumCount;

Left Join (table1)

LOAD Type,

    Country,

    [Data source],

    RankDataSource

Resident table2;

DROP Field SumCount;

DROP Table table2;

hope this helps

regards

Marco

manoranjan_d
Specialist
Specialist
Author

Many thanks Macro, But i m facing one more issue that is, if the stack bar share 50-50 values then the stack bar is showing as single stack bar not as segregated data in the stack bar. can u help me on this

example:

if the 5 th stack bar have value of  200000 and 200000 then i  geting as single stack bar of as 200000. but i need as two data has to be segregated

MarcoWedel

can you please post your application showing this behaviour?

thanks

regards

Marco

manoranjan_d
Specialist
Specialist
Author

Kindly see the attached file of the 5 the stack bar

MarcoWedel

Hi,

using the script based rather than the calculated dimension solution, I get:

QlikCommunity_Thread_191499_Pic4.JPG

hope this helps

regards

Marco