Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sort opportunities on stacked bar chart

Hey all,

I have a problem with 1 of my chart.

The chart here under represents the revenues of all my opportunities by month of the current year.

Capture.JPG

I have here 2 types of opportunities: Won (colored here in red) and Negociation (in others colors).

I'am trying to regroup all opportunities Won (in red) at the bottom of my chart.

To do so, i have tried the following custom sort in the script:

LOAD * INLINE

[

Stage, Stage order

Award (Closed Won), 1

Closed Lost, 2

Closed No Go, 3

Nego, 4

Proposal, 5

Prospect, 6

];

While i'm trying to regroup (sort) my opportunities_id regarding the Stage.order, i still have some opportunities not at the right place (cf picture above where the yellow is not at the right place and this opportunities is in the Negociation stage).

Any idea to solve this?

Thank you in advance

10 Replies
vinieme12
Champion III
Champion III

Ok, when i tried i had a selection in the Stage field, that is why it worked. but i will tell you why it is not working.

We are trying to Assign a color based on the Stage

Opportunity.ID  can have more than 1 stage so even if we give sort order to it qlikview can't evaluate if it should sort on sort order for Award or Nego !

but the field Opportunity_ID is a one to one relation with the Stage field, so instead of using field Opportunity.ID use Opportunity_ID as a dimension because one ID has only one stage assigned to it and hence only one sort value applies.

Hope this makes sense

chagnefield.PNG

2chagnefield.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.