Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, i have a stacked bar chart where i display bugs and each "stack" is for different sort of bugs. But i can display them only alphabetically asc or desc so - Trivial, Minor, Major, Critical, Blocker or Blocker, Critical, Major, Minor, Trivial. Bud i don´t want alphabetical order i want it based on the priority so Blocker, Trivial, Minor, Major, Critical. How to do that plsy?
You can sort by expression and use this:
Pick(Match([Bug Type], 'Blocker', 'Trivial', 'Minor', 'Major', 'Critical'), 1, 2, 3, 4, 5)
Hi,
one solution could be:
tapPrio:
LOAD *, RecNo() as prioNum
Inline [
priority
Blocker
Trivial
Minor
Major
Critical
];
tabBugs:
LOAD RecNo() as BugID,
Pick(Ceil(Rand()*5),'Blocker', 'Trivial', 'Minor', 'Major', 'Critical') as priority,
Date(Today()-Ceil(1000*Rand())) as [report date]
AutoGenerate 30;
hope this helps
regards
Marco
I typically will do something like this in my script before the main load:
[Bug Type Order]:
LOAD * INLINE [
Bug Type
Blocker
Trivial
Minor
Major
Critical
];
Do your main load, then:
DROP TABLE [Bug Type Order];
Then in the chart, sort by load order. I don't like fiddling with sort expressions in charts, or having an extra table lying around complicating my table model.
Edit: modified MarcoWedel's example to demonstrate