Drillthrough Action Does Not work on Calculated Measure on cube

Topics: Developer Forum
Nov 21, 2012 at 8:47 AM
Edited Nov 21, 2012 at 8:50 AM

 Action Expression Code:

"DRILLTHROUGH MAXROWS 100 SELECT (" +
ASSP.ASStoredProcs.FindCurrentMembers.CurrentCellAttributes()
+ ") ON 0 FROM [Incident] 
RETURN 
     NAME([$Incidents].[Incident ID] as [Incident ID])
    ,NAME([$Incidents].[Reported Time Date] as  [Reported Time Date])
    ,NAME([$Incidents].[Closed Time Date] as  [Closed  Time Date])
    ,NAME([$Incidents].[Resolution Time Date] as  [Resolution Time Date])
    ,NAME([$Incident Status].[Incident Status Name] as [Incident Status Name])
"

 

Hi,

 I have gone through the mosha's link to create drillthrough action on calculated measure. 

http://sqlblog.com/blogs/mosha/archive/2008/09/01/drillthrough-on-calculated-measures.aspx 

But it doesnt work as expected. I have downloaded and uploaded  ASSP.dll on AS Server. I couldnt find the action option when I right click on calculated measure while browsing the cube.Please let me know if I am doing anything wrong over here.Thanks in advance :)

version --> Microsoft SQL Server 2008 (SP3) - 10.0.5775.0 (X64)   Mar  8 2012 01:33:49   Copyright (c) 1988-2008 Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 5.2 <X64> (Build 3790: Service Pack 2)

Coordinator
Nov 21, 2012 at 6:32 PM

If your action is invalid in anyway it will not show up in the action list when the user right clicks on a cell.

In your case I think the issue is your RETURN clause. The AS <Alias> needs to go outside the NAME() function

"DRILLTHROUGH MAXROWS 100 SELECT (" +
ASSP.ASStoredProcs.FindCurrentMembers.CurrentCellAttributes()
+ ") ON 0 FROM [Incident] 
RETURN 
     NAME([$Incidents].[Incident ID]) as [Incident ID]
    ,NAME([$Incidents].[Reported Time Date]) as  [Reported Time Date]
    ,NAME([$Incidents].[Closed Time Date]) as  [Closed  Time Date]
    ,NAME([$Incidents].[Resolution Time Date]) as  [Resolution Time Date]
    ,NAME([$Incident Status].[Incident Status Name]) as [Incident Status Name]
"
Coordinator
Nov 21, 2012 at 9:01 PM

The following page offers three examples of drillthrough on calculated measures. All three examples use GetDefaultDrillthroughMDX. I would suggest you pull up this page and search for "calculated measure" to find the examples and try them.

http://asstoredprocedures.codeplex.com/wikipage?title=Drillthrough&referringTitle=Home