If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Problem sorting bars in bar graph

Started by Seveman, 15 Mar 2017 07:41:02 AM

Previous topic - Next topic

Seveman

Hi folks,

I ahve this problem. I have a graph that is supposed be updated to show monthly values for number of customers. The series are month, previous year month and target for the month. Month values are bars and target values are line. As of now, the graph is sorted showing the previous year values first and is supposed to be sorted so that current year month bar is on the left and previous year month is on the right. I seem not to be able to have the bars sorted the way I want them.
So far, I`ve tried sorting x-axis, making a set of the years and sorting the set, sorting the Y-nodes, deleting the py values and inserting again but nohting works. Any ideas?

Invisi

Make a sorting data item that contains 1, 2 or 3 for the corresponding value? Or maybe I should ask first: how is your data structured?
Few can be done on Cognos | RTFM for those who ask basic questions...

Seveman

Hi,
the structure is:
Measures "Real", "Target"
Dimensions:
"Time" normal time dimension with year, trimester, and month of which there is a data item that filters for current year and current month as well as previous year and previous month
"Indicator" a dimension that allows to select if you want to see sales, # of customers, expenses, etc.

So the data in the graph is:
data item "current year" = total [real] within set [current year]
data item "py year" = total [real] within set [current year]
data item "months" = months in time dimension
data item "target" = total [target] within set [current year]
data item "month number" = month number property of the month

Series (in order top down): "current year" (bar), "py year" (bar), target (line)
Categories "months"
sorting of category item "months" = "month number" so the months are shown in their order.



Seveman

Attaching images to make it clearer

Thanks

Seveman

Hi,
I solved the issue creating a new data item that contains the year and including the iten in the sorting property of the category (x axis) after the month sort so that the graph is sorting the bars by month first and then by the year.
Thanks Invisi.