![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
I am using the DESCENDANTS function to display unit sales by month across columns, with marital status on the rows. I want to not show the last |
|
SELECT CROSSJOIN( {[measures].[Unit Sales]}, DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns, {[marital status].members} on rows from Sales where [gender].[f] |
#2
| |||
| |||
|
|
I am using the DESCENDANTS function to display unit sales by month acros columns, with marital status on the rows. I want to not show the las |
|
SELECT CROSSJOIN( {[measures].[Unit Sales]} DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns {[marital status].members on row from Sale where [gender].[f |
#3
| |||
| |||
|
|
It is the last month with data. So if I were using real data, I would have records with February 2004 values, but I wouldn't want to show them |
|
Thanks for your help today. ----- Tom Chester wrote: ----- Andrea, is the last month the last member in the month level, the last month with data, or is it assumed to be the currentmember? public @ the domain below www.tomchester.net "Andrea Worley" <k_rage (AT) hotmail (DOT) com> wrote in message news:4C4E67FA-CDCB-4E9C-B166-ACA61EA2BA1F (AT) microsoft (DOT) com... I am using the DESCENDANTS function to display unit sales by month across columns, with marital status on the rows. I want to not show the last month. (In real data, this is to avoid showing data for the current month that isn't complete yet). Here's the MDX I've worked out on food mart. How can I make it not show the last month? Thanks for any help. SELECT CROSSJOIN( {[measures].[Unit Sales]}, DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns, {[marital status].members} on rows from Sales where [gender].[f] |
#4
| |||
| |||
|
|
It is the last month with data. So if I were using real data, I woul have records with February 2004 values, but I wouldn't want to show the |
|
Thanks for your help today ----- Tom Chester wrote: ---- Andrea, is the last month the last member in the month level, th last mont with data, or is it assumed to be the currentmember public @ the domain belo www.tomchester.ne "Andrea Worley" <k_rage (AT) hotmail (DOT) com> wrote in messag news:4C4E67FA-CDCB-4E9C-B166-ACA61EA2BA1F (AT) microsoft (DOT) com.. I am using the DESCENDANTS function to display unit sales by mont acros columns, with marital status on the rows. I want to not show th las month. (In real data, this is to avoid showing data for the curren mont that isn't complete yet). Here's the MDX I've worked out on foo mart. Ho can I make it not show the last month? Thanks for any help SELECT CROSSJOIN( {[measures].[Unit Sales]} DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns {[marital status].members on row from Sale where [gender].[f |
#5
| |||
| |||
|
|
-----Original Message----- That's just the trick I wanted, thank you. ----- Tom Chester wrote: ----- Something like this...? (not syntax checked) nonemptycrossjoin( { Time.[1997].FirstChild.FirstChild : Time.[1997].LastChild.LastChild.Lag(1) } , {Measures.[Unit Sales]}, 1) public @ the domain below www.tomchester.net "Andrea Worley" <k_Rage (AT) hotmail (DOT) com> wrote in message news:79860773-F041-4604-B1E6- 4AB3B48507CF (AT) microsoft (DOT) com... It is the last month with data. So if I were using real data, I would have records with February 2004 values, but I wouldn't want to show them until February was over (ie: March had begun, so always leave off the last month). Thanks for your help today. ----- Tom Chester wrote: ----- Andrea, is the last month the last member in the month level, the last month with data, or is it assumed to be the currentmember? public @ the domain below www.tomchester.net "Andrea Worley" <k_rage (AT) hotmail (DOT) com> wrote in message news:4C4E67FA-CDCB-4E9C-B166- ACA61EA2BA1F (AT) microsoft (DOT) com... I am using the DESCENDANTS function to display unit sales by month across columns, with marital status on the rows. I want to not show the last month. (In real data, this is to avoid showing data for the current month that isn't complete yet). Here's the MDX I've worked out on food mart. How can I make it not show the last month? Thanks for any help. SELECT CROSSJOIN( {[measures].[Unit Sales]}, DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns, {[marital status].members} on rows from Sales where [gender].[f] . |
#6
| |||
| |||
|
|
How do we remove the Hardcoding of [1997] from the Expression. (Incase I want the application to get the latest year automatically.) I was assuming [Time].LastChild would denote [Time].[1998] in the FoodMart 2000 Database but it was never the case. Can someone explain the behaviour. Cheers, Sanka -----Original Message----- That's just the trick I wanted, thank you. ----- Tom Chester wrote: ----- Something like this...? (not syntax checked) nonemptycrossjoin( { Time.[1997].FirstChild.FirstChild : Time.[1997].LastChild.LastChild.Lag(1) } , {Measures.[Unit Sales]}, 1) public @ the domain below www.tomchester.net "Andrea Worley" <k_Rage (AT) hotmail (DOT) com> wrote in message news:79860773-F041-4604-B1E6- 4AB3B48507CF (AT) microsoft (DOT) com... It is the last month with data. So if I were using real data, I would have records with February 2004 values, but I wouldn't want to show them until February was over (ie: March had begun, so always leave off the last month). Thanks for your help today. ----- Tom Chester wrote: ----- Andrea, is the last month the last member in the month level, the last month with data, or is it assumed to be the currentmember? public @ the domain below www.tomchester.net "Andrea Worley" <k_rage (AT) hotmail (DOT) com> wrote in message news:4C4E67FA-CDCB-4E9C-B166- ACA61EA2BA1F (AT) microsoft (DOT) com... I am using the DESCENDANTS function to display unit sales by month across columns, with marital status on the rows. I want to not show the last month. (In real data, this is to avoid showing data for the current month that isn't complete yet). Here's the MDX I've worked out on food mart. How can I make it not show the last month? Thanks for any help. SELECT CROSSJOIN( {[measures].[Unit Sales]}, DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns, {[marital status].members} on rows from Sales where [gender].[f] . |
#7
| |||
| |||
|
|
That's just the trick I wanted, thank you. ----- Tom Chester wrote: ----- Something like this...? (not syntax checked) nonemptycrossjoin( { Time.[1997].FirstChild.FirstChild : Time.[1997].LastChild.LastChild.Lag(1) } , {Measures.[Unit Sales]}, 1) public @ the domain below www.tomchester.net "Andrea Worley" <k_Rage (AT) hotmail (DOT) com> wrote in message news:79860773-F041-4604-B1E6-4AB3B48507CF (AT) microsoft (DOT) com... It is the last month with data. So if I were using real data, I would have records with February 2004 values, but I wouldn't want to show them until February was over (ie: March had begun, so always leave off the last month). Thanks for your help today. ----- Tom Chester wrote: ----- Andrea, is the last month the last member in the month level, the last month with data, or is it assumed to be the currentmember? public @ the domain below www.tomchester.net "Andrea Worley" <k_rage (AT) hotmail (DOT) com> wrote in message news:4C4E67FA-CDCB-4E9C-B166-ACA61EA2BA1F (AT) microsoft (DOT) com... I am using the DESCENDANTS function to display unit sales by month across columns, with marital status on the rows. I want to not show the last month. (In real data, this is to avoid showing data for the current month that isn't complete yet). Here's the MDX I've worked out on food mart. How can I make it not show the last month? Thanks for any help. SELECT CROSSJOIN( {[measures].[Unit Sales]}, DESCENDANTS({[Time].[1997]},[Time].[Month], SELF)) on columns, {[marital status].members} on rows from Sales where [gender].[f] |
![]() |
| Thread Tools | |
| Display Modes | |
| |