COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: saumil287 on 22 Mar 2011 01:52:37 AM

Title: Chart
Post by: saumil287 on 22 Mar 2011 01:52:37 AM
Hi All,
How to display top 10 orders in chart.
Its urgent Plz reply.
thanks in advance
Title: Re: Chart To display top 10 customers generated max revenue
Post by: saumil287 on 22 Mar 2011 04:29:20 AM
Do we have to use rank function for that .
If yes then how and where I have to write sql stmt for the same
Title: Re: Chart
Post by: bvk.cognoise on 22 Mar 2011 05:09:43 AM
hi saumil,

for eg:
> im creating a column chart report with data items Product Line,Revenue
>i drooped  Product line in 'X' axis
>i drooped  Revenue in Measure Axis
> i drooped a query calculation into Default legend box
>give the expression like    Rank([revenue])   then click ok
>select the the calculated data item click on filter  symbol at the top side of report page
>click on detailed filter give expression like Rank<=10 or you can use  ?Parameter?
>then select that filter change filter application to After Auto Aggregation
>then run the report u will get the output .


hope it works :(



thanks
bvk
Title: Re: Chart
Post by: saumil287 on 22 Mar 2011 11:39:05 PM
Hi Vamsi
I tried the above steps u had given but it is showing blank chart.
Title: Re: Chart
Post by: NimrodA on 23 Mar 2011 02:05:32 AM
Create a query for the chart.
In the query drop the query items you need (e.g. revenue, order). Drop in a data item and set it to rank the measure (rank ([measure] DESC)). set a filter on the query for rank<=10 to run after auto aggregation.
Create a chart and link it to the query you created, then drop in the measure in the measure box and the order in the legend box. You will get a chart showing 10 orders - the top 10 orders.
I'm attaching an xml of an example made on 8.4.1 with GO Data Warehouse (query) - the list shows all the data and the chart shows top ten.
Title: Re: Chart
Post by: bvk.cognoise on 23 Mar 2011 02:11:43 AM
Hi  saumil287,

actually it works.i developed few reports using this method.

thanks
bvk
Title: Re: Chart
Post by: saumil287 on 23 Mar 2011 06:02:23 AM
Hi vamsi,
I drooped query calculation on default legend box, but when I click on available Data Items, It is showing nothing.
In the morning I did the same thing but added a query calculation under legend series and during execution, the created query calculation was showing in chart y-axis which has values ranging from 1 to 10 and Y-axis is having values ranging in crores
I am confused about creating a dataitem plz reply as early as possible
Title: Re: Chart
Post by: saumil287 on 23 Mar 2011 06:04:53 AM
hi NimrodA
I didn,t understand the stmt  Drop in a data item and set it to rank the measure (rank ([measure] DESC)).
thanks
Title: Re: Chart
Post by: bvk.cognoise on 23 Mar 2011 06:18:38 AM
>just drag a column chart
>add measure data item in y axis
>drag dimension into x axis(eg:product line)
>drag a query calculation into  Default legend title not into series
>give query calculation expression like Rank([measure])
>then select that query calculation and click on filter
>click on  detailed filter
>in the detailed filter drag the rank item into filter window and give expression like

[rank]<=10

>then change the filter application to after auto aggregation
>run the report

do same process............its simple .coooooooooool  :)
Title: Re: Chart
Post by: NimrodA on 23 Mar 2011 07:02:16 AM
when editing the query, create a data item and set the expression to "rank([the-measure-you-need-to-rank] DESC)" without the quotes. You could just open the specs I attached.
Title: Re: Chart
Post by: saumil287 on 23 Mar 2011 08:07:23 AM
Hi vamsi
In the detailed filter which Rank item should I drag, the query calculation named ranker or the item which I used with ie the measure name.
I tried the same but showing blank chart.
thanks
Title: Re: Chart
Post by: saumil287 on 23 Mar 2011 09:53:01 AM
Hi
I got it
I had gone through the steps u send its working, but I did the same thing with excel as a datasource, it was not showing
Title: Re: Chart
Post by: saumil287 on 24 Mar 2011 01:05:39 AM
Hi All,
Thank You I got the result
On using Excel as datasource, first click on query, the properties appears.
Select proccessing equal to limited Local.
this will solve the problem
Title: Re: Chart
Post by: bvk.cognoise on 24 Mar 2011 01:29:09 AM
 :D finally u got it.good......