SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Create a Third Selection


Create a Third Selection

Author
Message
akirajt
akirajt
SSC-Enthusiastic
SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)SSC-Enthusiastic (146 reputation)

Group: General Forum Members
Points: 146 Visits: 191
Goal:
Enable to select everything in the semester list with one click only.

Problem:
I do not know how to create a third select with message "select all" or similiar in the parameter list Semester.

Information:
*Using SSAS as a data source
*One selection only in the semester list. THe user shall select one value only.



http://social.msdn.microsoft.com/Forums/sqlserver/en-US/27b4dce4-ca89-4fa3-9000-541b64b4e1d9/create-a-third-selection?forum=sqlreportingservices

Code:
Data set 1-------------------------------------
SELECT NON EMPTY
{
[Measures].[Internet Freight Cost],
[Measures].[Internet Standard Product Cost],
[Measures].[Internet Sales Amount]
} ON COLUMNS,

NON EMPTY
{

(

[Date].[Calendar Year].[Calendar Year].ALLMEMBERS * [Date].[Calendar Quarter of Year].[Calendar Quarter of Year].ALLMEMBERS * [Date].[Calendar Semester of Year].ALLMEMBERS

)

} DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS



FROM
(

SELECT ( { STRTOSET(@Semester, CONSTRAINED) } ) ON COLUMNS

FROM
(
SELECT ( { STRTOSET(@Year, CONSTRAINED) } ) ON COLUMNS
FROM [Adventure Works]
)


)
-------------------------------------




Dataset date -------------------------------------
WITH MEMBER
[Measures].[ParameterCaption] AS [Date].[Calendar Year].CURRENTMEMBER.MEMBER_CAPTION MEMBER
[Measures].[ParameterValue] AS [Date].[Calendar Year].CURRENTMEMBER.UNIQUENAME MEMBER
[Measures].[ParameterLevel] AS [Date].[Calendar Year].CURRENTMEMBER.LEVEL.ORDINAL
SELECT
{
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
}
ON COLUMNS,
[Date].[Calendar Year].[Calendar Year].allmembers ON ROWS
FROM [Adventure Works]
-------------------------------------





DatasetSemester -------------------------------------
WITH MEMBER
[Measures].[ParameterCaption] AS [Date].[Calendar Semester of Year].CURRENTMEMBER.MEMBER_CAPTION MEMBER
[Measures].[ParameterValue] AS [Date].[Calendar Semester of Year].CURRENTMEMBER.UNIQUENAME MEMBER
[Measures].[ParameterLevel] AS [Date].[Calendar Semester of Year].CURRENTMEMBER.LEVEL.ORDINAL
SELECT
{
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
}
ON COLUMNS,
[Date].[Calendar Semester of Year].[Calendar Semester of Year].ALLMEMBERS ON ROWS
FROM
(
SELECT ( { STRTOSET(@Year, CONSTRAINED) } ) ON COLUMNS
FROM [Adventure Works]
)
-------------------------------------
Mark Fitzgerald-331224
Mark Fitzgerald-331224
SSCarpal Tunnel
SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)SSCarpal Tunnel (4.4K reputation)

Group: General Forum Members
Points: 4431 Visits: 1650
I have reproduced you requirement using a different cube. The issue is the hierarchy you have chosen to show ([Date].[Calendar Semester of Year].[Calendar Semester of Year]) is part of a user defined hierarchy and you are using a level within that. The ALL member is not available here without adding it back in using UNION. Changing the hierarchy to the attribute hierarchy would be simpler.

WITH MEMBER
[Measures].[ParameterCaption] AS [Date].[Calendar Semester of Year].CURRENTMEMBER.MEMBER_CAPTION MEMBER
[Measures].[ParameterValue] AS [Date].[Calendar Semester of Year].CURRENTMEMBER.UNIQUENAME MEMBER
[Measures].[ParameterLevel] AS [Date].[Calendar Semester of Year].CURRENTMEMBER.LEVEL.ORDINAL
SELECT
{
[Measures].[ParameterCaption],
[Measures].[ParameterValue],
[Measures].[ParameterLevel]
}
ON COLUMNS,

[Date].[Calendar Semester of Year].ALLMEMBERS ON ROWS

FROM
(
SELECT ( { STRTOSET(@Year, CONSTRAINED) } ) ON COLUMNS
FROM [Adventure Works]
)

You may need to change your report dataset query to also handle the ALL item.

Fitz
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search