Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help needed in sorting expression for bar chart

Hi All ,

i have a trend graph on a bar chart , were i am uploading 3 months of data . i would like to sort data on the basis of last uploaded month data.

for example : i am uploading data for october , november and decemeber . now i need to sort data on the basis of december data and i need to show respective november and october months data .

we have  two dimenions

dottp1p2_enterprisesystem

monthdottp1p2

expression is

sum(days open)/ count(dottp1p2_enterprisesystem)

i use this sort expression

= count({<monthdottp1p2 = {"$(vmonth_current)"}>}dottp1p2_enterprisesystem)


the second image is the right one , for that i also need correspoding novemeber and october values .

i am getting the first image which is a wrong one .

hope it helps

16 Replies
Not applicable
Author

the expression i have is ,

sum(days open)/ count(dottp1p2_enterprisesystem)

and my dimensions are

dottp1p2_enterprisesystem

monthdottp1p2

the sort expression which i am using is

= count({<monthdottp1p2 = {"$(vmonth_current)"}>}dottp1p2_enterprisesystem)

but i am still getting the same values

krishna20
Specialist II
Specialist II

Hi,

Have you tried by keeping Y-Value at Descending?

Regards

Krishna

Not applicable
Author

any help is much appreciated

krishna20
Specialist II
Specialist II

Hi,

Please try this expression at your calculated dimension and let me know.Please edit this expression as for your second dimension also.Keep your expressions remains same and please, let me know that"  (sum(days open)/ count(dottp1p2_enterprisesystem)) " is the only expression you are using? If yes, please replace your second dimension field  in the below expression and try it.

=Aggr(Only({<dottp1p2_enterprisesystem={"(sum(days open)/ count(dottp1p2_enterprisesystem))"}>} dottp1p2_enterprisesystem), dottp1p2_enterprisesystem)



Regards


Krishna

Not applicable
Author


i am getting only one value 63 , i dont know what it is about . it is a wriong value i feel . i have two calculated dimenions you mentioned and i have expression measure as sum(days open)/ count(dottp1p2_enterprisesystem).
i am attaching you  image too. Capture1.PNG

Not applicable
Author


any idea krishna , why it is giving this value . i am not not good with aggegrate function . can you tell me what you were trying to acheive with those calculated dimension ?

krishna20
Specialist II
Specialist II

Hi,

Please follow this link.

Bar chart Problem

Regards

Krishna