dbTalk Databases Forums  

Problem with chart

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Problem with chart in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sanjeev
 
Posts: n/a

Default Problem with chart - 08-01-2005 , 08:21 AM







I am creating a distribution chart, i need count's in diffrent ranges
e.g.
between 0 and 1 --> count 2
between 1 and 2 --> count 8


i achived this by


with
set [TimeRange] as '{ [Time].[All Year].[1993].[2].[6]:[Time].[A*ll
Year].[2000].[4].[12] }'
set [Funds] as '{ [Fund].[All Fund Id].[3] }'


member [Measures].[0-1] as 'count (FILTER( {[TimeRange]} ,
[Measures].[MTD ROR] * 100 >= 0 and [Measures].[MTD ROR] * 100 <

1 ))'
member [Measures].[1-2] as 'count (FILTER( {[TimeRange]} ,
[Measures].[MTD ROR] * 100 >= 1 and [Measures].[MTD ROR] * 100 <

2 ))'


select {[Funds]} on columns,
{[Measures].[0-1], [Measures].[1-2] } on rows
from [Data]


now problem is, in result set "column name" is fund id
e.g if i use fund id "3" then column name is "3" , if "4" the column
name is "4",

this becomes problem when creating bar chart as it needs static column
name.

Please suggest how to achive I might need static column name like
"fund" to draw chart object, or any other way like fields(0) to create
chart.

please help


Thanks
Sanjeev


Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Problem with chart - 08-01-2005 , 07:10 PM






If you're using Reporting Services, placing measures on columns often
works better, like:

Quote:
select {[Measures].[0-1], [Measures].[1-2]} on columns,
[Funds] on rows
from [Data]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #3  
Old   
Sanjeev
 
Posts: n/a

Default Re: Problem with chart - 08-02-2005 , 10:29 AM



thanks but this doesn't solve my problem , actually i have to create a
bar chart.

right now i have following resultset
[3]
[0-1] 2
[1-2] 5
[2-3] 4

what i need is

[FUND]
[0-1] 2
[1-2] 5
[2-3] 4

because chart objects needs a column that contains values but in mdx
result set "column name" is changing based on report parameter.

thanks
Sanjeev


Reply With Quote
  #4  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Problem with chart - 08-02-2005 , 11:14 AM



What does [3] represent, in the resultset you gave - can you cite the
MDX used? If fixed measures are on columns, then column names will NOT
vary with report parameters.


- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***

Reply With Quote
  #5  
Old   
Sanjeev
 
Posts: n/a

Default Re: Problem with chart - 08-06-2005 , 06:12 AM



it is a dimention [funds].[3] for which i need result but this may vary
accourding to parameter


Reply With Quote
  #6  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Problem with chart - 08-08-2005 , 10:31 PM



In the original MDX query, [Funds] can be crossjoined on rows, and a
fixed member can be placed on columns, like:

Quote:
select {[Time].[All Year]} on columns,
CrossJoin({[Measures].[0-1],[Measures].[1-2]},
[Funds]) on rows
from [Data]
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
  #7  
Old   
Sanjeev
 
Posts: n/a

Default Re: Problem with chart - 08-09-2005 , 01:59 AM



Thanks, It works , can you please guide me on usase of crossjoin, its
really powerfull


Reply With Quote
  #8  
Old   
Deepak Puri
 
Posts: n/a

Default Re: Problem with chart - 08-09-2005 , 09:41 AM



Here's an article on Crossjoin by William Pearson:

http://www.databasejournal.com/featu...le.php/3334631
Quote:
April 12, 2004
MDX Essentials: Basic Set Functions: The CrossJoin() Function
By William Pearson
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.com ***


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.