Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Sorting and limiting bar chart

Dear All,

Please find attached a qvf, i which i want to limit the bars as below.

In Gross Margin bar chart

-> i want to show only those bars when its value is greater than 10%

-> want to Sort those bars by expression sum(Revenue) and llmit the bar nos to 2 only.

-> Dont want to use the filters, hence automatically wants to show the result for max(fmonthCD)

can you please guide here.

Sorting and limit.JPG

Tags (1)
13 Replies
Not applicable

Re: Sorting and limiting bar chart

Perhaps one of these posts could help?

Sorting issue in bar chart

Sorting issue

Not applicable

Re: Sorting and limiting bar chart

i have tried , but its not working as per the requirement.

can you please check the attached qvf

Not applicable

Re: Sorting and limiting bar chart

can somebody help me on this ?

Thanks

Prasanta

reddys310
Honored Contributor II

Re: Sorting and limiting bar chart

Hi Prasanta,

Yes its possible. The QVF you attached seems to be blank. Do i have created a barchart with the same issue.

Check the QVF:

Thanks,

Sangram

MVP
MVP

Re: Sorting and limiting bar chart

Hi,

please find attached but I don't understand the last requirement. I use this measure:

sum({<Customers={"=sum(Activity1+Activity2+Activity3+alt(Pcost,0)+alt(Tcost,0))/sum(TOTAL Activity1+Activity2+Activity3+alt(Pcost,0)+alt(Tcost,0)) >= 0.1"}>}

Activity1+Activity2+Activity3+alt(Pcost,0)+alt(Tcost,0))/

sum(TOTAL Activity1+Activity2+Activity3+alt(Pcost,0)+alt(Tcost,0))

Had to use Alt() since due to NULL values in all rows Qlik Sense seems to have an issue to add them.

SortingTest.PNG

- Ralf

Not applicable

Re: Sorting and limiting bar chart

Hi Ralf.

thanks for your feedback. But still i am not getting the required result.

Please refer the attached qvf file.

In Gross Margin Bar graph, I want to show only 2 bars with below condition.

Gross margin value should be greater than 10% and the two bars should be ordered by sum(Revenue).

Which means out of the below bars shown in below picture, i just want to show the bars for customer - HP and Bharti.

Also the last condition, was if i can create a set analysis in my expression to pick the last month value as per column "fMonthCD" ! !

Srt issue.JPG

MVP
MVP

Re: Sorting and limiting bar chart

But there are 4 bars over 10%. Do you want to show the top 2 bars?

Not applicable

Re: Sorting and limiting bar chart

yes only 2 bars whose gross margin is greater than 10% and has highest sum(revenue)

Not applicable

Re: Sorting and limiting bar chart

formula for gross margin is

(sum(Activity1)+sum(Activity2)+sum(Activity3)+sum(Pcost)+sum(Tcost))/sum(Revenue)

Community Browser