dbTalk Databases Forums  

Measure Properties

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


Discuss Measure Properties in the microsoft.public.sqlserver.olap forum.



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

Default Measure Properties - 01-05-2006 , 04:55 AM






is there any way i can get Format_string property of Measure and Metric
?

Thanks n Advance,

Faraz


Reply With Quote
  #2  
Old   
Vladimir Chtepa
 
Posts: n/a

Default Re: Measure Properties - 01-05-2006 , 07:13 AM






Hi,

You could get the Format_string property of a Measure using AMO or DSO.

What is the "Metric" in your question?

Vladimir Chtepa.

"Faraz" <ahmed.faraz1 (AT) gmail (DOT) com> schrieb im Newsbeitrag
news:1136458550.021412.210600 (AT) g44g2000cwa (DOT) googlegroups.com...
Quote:
is there any way i can get Format_string property of Measure and Metric
?

Thanks n Advance,

Faraz




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

Default Re: Measure Properties - 01-05-2006 , 07:20 AM



I want to do it using MDX or XMLA . is there any way i can get this
property ?


Thanks ,

Faraz


Reply With Quote
  #4  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Measure Properties - 01-10-2006 , 05:53 AM



You can do it using the CELL PROPERTIES clause. The only issue may be
how your client application returns this data. If you are using ADO or
ADOMD you will be able to extract these values from each cell, other
clients may have issues.

If you run the following MDX Query in SSMS and double click on a cell it
will show you the format_string property.


WITH
SELECT {[Measures].Members} ON 0
,[Product].[Product Categories].[Category].Members ON rows
FROM [Adventure Works]
CELL PROPERTIES FORMATTED_VALUE, FORMAT_STRING


--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <1136467221.185044.169060 (AT) f14g2000cwb (DOT) googlegroups.com>,
ahmed.faraz1 (AT) gmail (DOT) com says...
Quote:
I want to do it using MDX or XMLA . is there any way i can get this
property ?


Thanks ,

Faraz



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

Default Re: Measure Properties - 01-13-2006 , 02:08 AM



i want to extract the property of the Measure or Metric and then apply
on the Cell Calculation to show the same format as the measure or
metric.

this is the query to have an idea what i want to do

With Cell Calculation MY_CELL For
'( { [Measures].[Sales Count]} )' As
'CalculationPassValue(Measures.CurrentMember, -1 ,Relative )',
CONDITION =' Some Condition will be here'
, SOLVE_ORDER ='2000',
FORE_COLOR ='11005',
CALCULATION_PASS_NUMBER ='2', CALCULATION_PASS_DEPTH ='1' ,
-- Here i want to set the format_string Property same as Sales count
Measure
FORMAT_STRING = '#0.00'

SELECT
{ CrossJoin({[Customers].[Country].[USA].CHILDREN},{Measures.[Sales
Count]})} ON COLUMNS ,
{{[Time].[Month Of Year].MEMBERS}} ON ROWS
FROM [Sales] CELL PROPERTIES
[VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]


Reply With Quote
  #6  
Old   
 
Posts: n/a

Default Re: Measure Properties - 01-13-2006 , 04:39 PM



I don't think you can get at the format string in this context. I tried
a few things, but nothing worked. If you are using AS2005 you could
probably write a function in .Net that would return it for you. If you
are using AS2000 you might be stuck with having to look up and type in
the format.

Unless anyone else has any ideas?

--
Regards
Darren Gosbell [MCSD]
Blog: http://www.geekswithblogs.net/darrengosbell

In article <1137139713.222189.200620 (AT) z14g2000cwz (DOT) googlegroups.com>,
ahmed.faraz1 (AT) gmail (DOT) com says...
Quote:
i want to extract the property of the Measure or Metric and then apply
on the Cell Calculation to show the same format as the measure or
metric.

this is the query to have an idea what i want to do

With Cell Calculation MY_CELL For
'( { [Measures].[Sales Count]} )' As
'CalculationPassValue(Measures.CurrentMember, -1 ,Relative )',
CONDITION =' Some Condition will be here'
, SOLVE_ORDER ='2000',
FORE_COLOR ='11005',
CALCULATION_PASS_NUMBER ='2', CALCULATION_PASS_DEPTH ='1' ,
-- Here i want to set the format_string Property same as Sales count
Measure
FORMAT_STRING = '#0.00'

SELECT
{ CrossJoin({[Customers].[Country].[USA].CHILDREN},{Measures.[Sales
Count]})} ON COLUMNS ,
{{[Time].[Month Of Year].MEMBERS}} ON ROWS
FROM [Sales] CELL PROPERTIES
[VALUE],[FORMATTED_VALUE],[CELL_ORDINAL],[FORE_COLOR]




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.