Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Caculated Measure - Date Filter - Range

 
   Database Help (Home) -> OLAP RSS
Next:  Use form combobox to trigger filtered query param..  
Author Message
balajikkrishnan via SQLMo

External


Since: Mar 18, 2008
Posts: 22



(Msg. 1) Posted: Thu Dec 11, 2008 10:25 am
Post subject: Caculated Measure - Date Filter - Range
Archived from groups: microsoft>public>sqlserver>olap (more info?)

Hi All,

How do I create a calculated measure to display a measure between two
different date ranges

Then the query looks like [tsub_dt > 15/10/2008' and tsub_dt < 05/12/2008]

Thanks
Balaji

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-olap/200812/1

 >> Stay informed about: Caculated Measure - Date Filter - Range 
Back to top
Login to vote
Michael G. Schneider

External


Since: Dec 03, 2008
Posts: 23



(Msg. 2) Posted: Thu Dec 11, 2008 11:25 am
Post subject: Re: Caculated Measure - Date Filter - Range [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"balajikkrishnan via SQLMonster.com" schrieb im Newsbeitrag


> How do I create a calculated measure to display a measure between two
> different date ranges
>
> Then the query looks like [tsub_dt > 15/10/2008' and tsub_dt < 05/12/2008]

In data source view right-click on a table, then choose 'new calculated
expression'. Enter something like

CASE WHEN tsub_dt BETWEEN '15/10/2008' AND '05/12/2008' THEN 'INSIDE' ELSE
'OUTSIDE' END

You can then use this expression like any other column.

Michael G. Schneider

 >> Stay informed about: Caculated Measure - Date Filter - Range 
Back to top
Login to vote
balajikkrishnan via SQLMo

External


Since: Mar 18, 2008
Posts: 22



(Msg. 3) Posted: Fri Dec 12, 2008 12:28 am
Post subject: Re: Caculated Measure - Date Filter - Range [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Michael,

These Dates are dynamic, user might change and want to see the result. I just
gave an example '15/10/2008' and 15/12/2008.

Thanks
Balaji


Michael G. Schneider wrote:
>> How do I create a calculated measure to display a measure between two
>> different date ranges
>>
>> Then the query looks like [tsub_dt > 15/10/2008' and tsub_dt < 05/12/2008]
>
>In data source view right-click on a table, then choose 'new calculated
>expression'. Enter something like
>
>CASE WHEN tsub_dt BETWEEN '15/10/2008' AND '05/12/2008' THEN 'INSIDE' ELSE
>'OUTSIDE' END
>
>You can then use this expression like any other column.
>
>Michael G. Schneider

--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-olap/200812/1
 >> Stay informed about: Caculated Measure - Date Filter - Range 
Back to top
Login to vote
amish

External


Since: Apr 19, 2007
Posts: 45



(Msg. 4) Posted: Thu Dec 18, 2008 1:32 am
Post subject: Re: Caculated Measure - Date Filter - Range [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Dec 11, 7:35 pm, "balajikkrishnan via SQLMonster.com"
wrote:
> Hi All,
>
> How do I create a calculated measure to display a measure between two
> different date ranges
>
> Then the query looks like [tsub_dt > 15/10/2008’ and tsub_dt < 05/12/2008]
>
> Thanks
> Balaji
>
> --
> Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-olap/200812/1

Try this MDX in AdventureWorks

This will check if year between 2003 to 2004 it will show inside else
it will show outside.


with member [Measures].[test]
as
iif(isempty((exists ([Date].[Fiscal].currentmember,{[Date].[Fiscal].
[Fiscal Year].&[2003]:[Date].[Fiscal].[Fiscal Year].&[2004]}).item(0),
[Measures].[Internet Sales Amount])),"Outside","inside")

select {[Measures].[Internet Sales Amount], [Measures].[test]} on 0 ,
[Date].[Fiscal].[Fiscal Year] on 1
from
[Adventure Works]




Thanks and Regards
Amish shah
http://shahamishm.blogspot.com
 >> Stay informed about: Caculated Measure - Date Filter - Range 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Date Range in MDX - Hello, We have recently created a cube in SSAS and now we are in the process of making our first simple report using the cube as a datasource. We can't for the life of us figure out how to get a date range in place on our data. I apologize in advance...

Returning a value for a measure evaluated over a set in a .. - I'm having a lot of problems trying to create a calculated measure that returns the value of another measure over a specified time series. If I run a select to return the data there is no problem and the select statement I'm using looks like the..

MDX date range query - Hopefully this is just fundamental bread-and-butter MDX querying for somebody who can guide me in the right direction while my book arrives in the post... I am trying to return a really simply set of results, filtered between a range of dates. In..

using non-measure column in MDX - I have a column named Named "Receipt no" in the two facts tables(sales_fact,usage_fact) this column is not a measure and i have to check the existance of sales_fact "Receipt no" in usage_fact "Receipt no" like in SQL SA...

Lookup measure - Hi everyone, Let's say (just for making everything simpler) that I have a Sales cube with two dimensions: Date and Location and one measure: Value. Is it possible to define a new measure (PreviousDayValue) which will hold the Value data for the..
   Database Help (Home) -> OLAP All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]