December 31, 2008 at 3:17 am
Hi all
I finally success to order my query by calculated measues.
Now, i would like to extract only last line for each memberB :
Bonjour
[MemberB] | [MemberA] | [Last_Date]
America | 01/01/2000 | 20000101
America | 13/01/2000 | 20000113
Europa | 05/01/2000 | 20000105
Europa | 01/02/2008 | 20080201
Toyota | 01/01/2005 | 20050101
...
to have only :
America | 13/01/2000 | 20000113
Europa | 01/02/2008 | 20080201
Toyota | 01/01/2005 | 20050101
I use Tail function but it return only last line 🙁
How I can extract the last line for each memberB ?
thanks
January 2, 2009 at 2:00 am
Hi all
happy new year !!
I finally resolve this issue :
WITH
MEMBER [Measures].[Last_Date] AS
Mid([HierarchyA].[MemberA].CurrentMember.Member_Caption,7,4) + Mid([HierarchyA].[MemberA].CurrentMember.Member_Caption,4,2) + Mid([HierarchyA].[MemberA].CurrentMember.Member_Caption,1,2)
SELECT
NON EMPTY
{[Measures].[Last_Date]} ON COLUMNS
,NON EMPTY
Order(
Filter([HierarchyB].[MemberB].[SubMemberB].ALLMEMBERS
*
HierarchyA].[MemberA].[SubMemberB].ALLMEMBERS,[Measures].[MeasureA]>0)
,[Measures].[Last_Date],ASC)
ON ROWS
FROM
[CUBEOLAP]
bur now, i would like to extract, for each memberB value, the last line of the result :
[MemberB] | [MemberA] | [Last_Date]
America | 01/01/2000 | 20000101
America | 13/01/2000 | 20000113
Europa | 05/01/2000 | 20000105
Europa | 01/02/2008 | 20080201
Toyota | 01/01/2005 | 20050101
...
to have only :
America | 13/01/2000 | 20000113
Europa | 01/02/2008 | 20080201
Toyota | 01/01/2005 | 20050101
i try with tail function, but it retrieve only last line, and max function need numeric value, so, my memberB and Last_Date value are string.
Could I convert the last_date value on numeric ?
how I can retrieve the last line for each memberB ?
Thanks a lot
regards
j'ai utilisé la fonction tail mais ca ne ramène que la dernière ligne
Dernière modification par phoenix75 ; 31/12/2008 à 16h40
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply