This project has moved and is read-only. For the latest updates, please go here.

GetCudtomeDrillthroughMDX function not able to rename Dimesion column names( SSAS 2014 with ASSP 2014 DLL file)

Topics: Developer Forum, User Forum
Sep 19, 2016 at 1:17 PM
Edited Sep 19, 2016 at 1:19 PM
Hi,

I am using below code to implement Drillthrough functionality in SSAS Cube, under ACTION tab. User is accessing excel o browse the cube and do Drillthrough functionality.

I have used the same code in SSAS 2008R2 version, it works well. I can see renaming Dimension names in the excel.

I did the same implementation on SSAS 2014 version(downloaded 2014 dll file from download and added the dll file on SSAS engine as per documentation), not able to rename Dimension column names. But I can rename Measure names.

Anyone can help, what could be the reason for not renaming Dimension names?
ASSP.GetCustomDrillthroughMDX(

" NAME([$Legal Entity].[Legal Entity Name]) as [Legal Entity Name]
, NAME([$Country].[Country Name])
, NAME([$Country].[Country Region])
, NAME([$Document No].[Document No])
, NAME([$Gl Account].[GL Account No])
, NAME([$Gl Account].[GL Account Name])
, NAME([$Subaccount].[Subaccount Code])
, NAME([$Subaccount].[Subaccount Name])
, NAME([$Cost Center].[Costcenter Code])
, NAME([$Cost Center].[Costcenter Name])
, NAME([$Vendor].[Vendor No])
, NAME([$Vendor].[Vendor Name])
, [Finance].[Finance Amount LCY] as [Finance Amount LCY]
, [Finance].[Finance Amount USD] as [Finance Amount USD]
, [Finance].[Finance Amount DR USD] as [Finance Amount DR USD]"
)
Sep 19, 2016 at 1:45 PM
Just now found the solution as below:

I have to write measures first and then go to Dimension names like below:
ASSP.GetCustomDrillthroughMDX(
" [Finance].[Finance Amount LCY] as [Finance Amount LCY]
, [Finance].[Finance Amount USD] as [Finance Amount USD]
, [Finance].[Finance Amount DR USD] as [Finance Amount DR USD]
, NAME([$Legal Entity].[Legal Entity Name]) as [Legal Entity Name]
, NAME([$Country].[Country Name]) as [Country Name]
, NAME([$Country].[Country Region]) as [Country Region]
, NAME([$Document No].[Document No]) as [Document No]
, NAME([$Gl Account].[GL Account No]) as [GL Account No]
, NAME([$Gl Account].[GL Account Name]) as [GL Account Name]
, NAME([$Subaccount].[Subaccount Code]) as [Subaccount Code]
, NAME([$Subaccount].[Subaccount Name]) as [Subaccount Name]
, NAME([$Cost Center].[Costcenter Code]) as [Costcenter Code]
, NAME([$Cost Center].[Costcenter Name]) as [Costcenter Name]
, NAME([$Vendor].[Vendor No]) as [Vendor No]
, NAME([$Vendor].[Vendor Name]) as [Vendor Name]"
)
Is there anyway , can I write the measures at the end of the statement like after Dimensions columns ?
ASSP.GetCustomDrillthroughMDX(

" NAME([$Legal Entity].[Legal Entity Name]) as [Legal Entity Name]
, NAME([$Country].[Country Name]) as [Country Name]
, NAME([$Country].[Country Region]) as [Country Region]
, NAME([$Document No].[Document No]) as [Document No]
, NAME([$Gl Account].[GL Account No]) as [GL Account No]
, NAME([$Gl Account].[GL Account Name]) as [GL Account Name]
, NAME([$Subaccount].[Subaccount Code]) as [Subaccount Code]
, NAME([$Subaccount].[Subaccount Name]) as [Subaccount Name]
, NAME([$Cost Center].[Costcenter Code]) as [Costcenter Code]
, NAME([$Cost Center].[Costcenter Name]) as [Costcenter Name]
, NAME([$Vendor].[Vendor No]) as [Vendor No]
, NAME([$Vendor].[Vendor Name]) as [Vendor Name]
, [Finance].[Finance Amount LCY] as [Finance Amount LCY]
, [Finance].[Finance Amount USD] as [Finance Amount USD]
, [Finance].[Finance Amount DR USD] as [Finance Amount DR USD]"
)
Sep 19, 2016 at 8:59 PM
Interesting. That GetCustomDrillthroughMDX function just returns the DRILLTHROUGH statement query text and doesn't actually execute the query. So if the column names come back wrong, that's just a plain SSAS bug at first blush. If it's a big deal, then you might open a support case with the SSAS team at Microsoft.
Sep 22, 2016 at 10:00 AM
Hi furmangg,

I just displayed measure first and then dimension names. I explained situation to my users and they accepted. So no worries :)
Thank you for your reply.