![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
any idea why this gives an error sum({[Tid].[Dag].&[1/01/1998]:[Tid].currentmember},[Measures].[Beløbx]) |
#3
| |||
| |||
|
|
it accepts the syntax but gives error when displyaing result "michael v" <test (AT) test (DOT) com> wrote in message news:u5prdoklGHA.3304 (AT) TK2MSFTNGP03 (DOT) phx.gbl... any idea why this gives an error sum({[Tid].[Dag].&[1/01/1998]:[Tid].currentmember},[Measures].[Beløbx]) |
#4
| ||||
| ||||
|
| With Member [Measures].[SalesRange] as |
| With Member [Measures].[SalesRange] as |
#5
| |||
| |||
|
|
Hi Michael, Are you trying to sum up the (I don't have the same character set) Belobx measure from 1/1/98 to whatever date the user selects? You're defining a range inclusive from 1/1/98 to the current member of the date dimension, but the way you have it specified, the two are potentially on different levels. I don't know what the results will be in the first place, but try changing the 2nd member of the range clause to [Tid].[Dag].CurrentMember to get them on the same level. "michael v" <test (AT) test (DOT) com> wrote in message news:%235uRBsklGHA.2136 (AT) TK2MSFTNGP04 (DOT) phx.gbl... it accepts the syntax but gives error when displyaing result "michael v" <test (AT) test (DOT) com> wrote in message news:u5prdoklGHA.3304 (AT) TK2MSFTNGP03 (DOT) phx.gbl... any idea why this gives an error sum({[Tid].[Dag].&[1/01/1998]:[Tid].currentmember},[Measures].[Beløbx]) |
#6
| |||
| |||
|
|
Could be because [Tid].currentmember is not at the same level of [Tid] as [Tid].[Dag].&[1/01/1998]. For example, this Foodmart query returns errors at the year and quarter level: With Member [Measures].[SalesRange] as 'Sum([Time].[1997].[Q1].[1]:[Time].CurrentMember, [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales But it works fine if YTD() is used instead of range: With Member [Measures].[SalesRange] as 'Sum(YTD([Time].CurrentMember), [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#7
| |||
| |||
|
|
Could be because [Tid].currentmember is not at the same level of [Tid] as [Tid].[Dag].&[1/01/1998]. For example, this Foodmart query returns errors at the year and quarter level: With Member [Measures].[SalesRange] as 'Sum([Time].[1997].[Q1].[1]:[Time].CurrentMember, [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales But it works fine if YTD() is used instead of range: With Member [Measures].[SalesRange] as 'Sum(YTD([Time].CurrentMember), [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#8
| |||
| |||
|
|
atually think i got it solved like this sum([Tid].[År].&[1/01/1998]:ancestor(parallelperiod([År],1,[tid].currentmemb er),[År]),[Measures].[Beløbx])+sum(ytd(),[measures].[beløbx]) and the sentence doenst look to bad - no IIF's... ![]() "Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote in message news:eumfPbmlGHA.5044 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Could be because [Tid].currentmember is not at the same level of [Tid] as [Tid].[Dag].&[1/01/1998]. For example, this Foodmart query returns errors at the year and quarter level: With Member [Measures].[SalesRange] as 'Sum([Time].[1997].[Q1].[1]:[Time].CurrentMember, [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales But it works fine if YTD() is used instead of range: With Member [Measures].[SalesRange] as 'Sum(YTD([Time].CurrentMember), [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#9
| |||
| |||
|
|
Yes, but that "o" has that funny line through it. <g Goede Morgen! "michael v" <test (AT) test (DOT) com> wrote in message news:eQ3uJvqlGHA.5036 (AT) TK2MSFTNGP05 (DOT) phx.gbl... atually think i got it solved like this sum([Tid].[År].&[1/01/1998]:ancestor(parallelperiod([År],1,[tid].currentmemb er),[År]),[Measures].[Beløbx])+sum(ytd(),[measures].[beløbx]) and the sentence doenst look to bad - no IIF's... ![]() "Deepak Puri" <deepak_puri (AT) progressive (DOT) com> wrote in message news:eumfPbmlGHA.5044 (AT) TK2MSFTNGP02 (DOT) phx.gbl... Could be because [Tid].currentmember is not at the same level of [Tid] as [Tid].[Dag].&[1/01/1998]. For example, this Foodmart query returns errors at the year and quarter level: With Member [Measures].[SalesRange] as 'Sum([Time].[1997].[Q1].[1]:[Time].CurrentMember, [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales But it works fine if YTD() is used instead of range: With Member [Measures].[SalesRange] as 'Sum(YTD([Time].CurrentMember), [Measures].[Unit Sales])' select {[Measures].[Unit Sales], [Measures].[SalesRange]} on 0, Descendants([Time].[1997]) on 1 from Sales - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |