Not able to execute ASSP procedure in SSAS Drillthrough action SSAS 2012 - ssas

I need to write a custom drillthrough in SSAS 2012 Multidimensional cube so I used ASSP GetCustomMDX function but I am un able to execute it :-
CALL ASSP.GetDefaultDrillthroughMDX([Measures].[Internet Sales-Sales Amount])
throws below error :-
No cube specified. A cube must be specified for this command to work.
enter image description here

Maybe you need a cube name before [Measures]. Try this, just put your cube name instead of YourCubeName:
CALL ASSP.GetDefaultDrillthroughMDX([YourCubeName].[Measures].[Internet Sales-Sales Amount])

Related

Finding which function cause the error message while processing a table

by processing (Process Full,Process Data) a table (every table) in my cube, I get the following error:
Failed to save modifications to the server. Error returned: 'A function 'MAX' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
A function 'MAX' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
The credentials provided for the SQL source are invalid. (Source at XXXX;XXXX.). The exception was raised by the IDbCommand interface.
How can I find which function cause this error?
Query the $SYSTEM.MDSCHEMA_MEASURES DMV, which lists measures in a Tabular model. The Expression column contains the definition of each measure, and you can use this to find any measures that have the MAX function that was specified in the error message. SSAS DMVs can either be queried from an MDX query editor window in SSMS or another tool such as Dax Studio. Dax Studio contains a listing of DMVs, and if you don’t already use it I’d recommend looking into this. You here find more information on this here. You can also execute your
measure in Dax Studio, which can help with
debugging it. You will also want to verify that the account you’re using has the proper permissions on the SQL Server objects used by your Tabular model.

Simple grid from SSAS cube using MDX command

is there a better way to display simple grid (looking basically like SQL select statement) from SSAS cube using MDX command instead of using this Drillhrough workaround?
Here is what I've been using so far:
DRILLTHROUGH
Select
([Measures].[Some Measure]) on columns
From (
Select
{
[PeriodSpan].&[201301] : [PeriodSpan].&[201304]
}
on columns
From [CubeName]
)
RETURN
[$Dimension1].[Attribute1],[$Dimension1].[Attribute2],[$Dimension1].[Attribute3],[$Dimension1].[Attribute4],[$Dimension1].[Attribute5],
[$Dimension2].[Attribute1],[$Dimension2].[Attribute2],[$Dimension2].[Attribute3],
[$Dimension3].[Attribute1],[$Dimension3].[Attribute2],[$Dimension3].[Attribute3],[$Dimension3].[Attribute4],
IIF([Dimension4].[Attribute1]=[Dimension4].[Attribute1].&[False],[Dimension4].[Attribute2],[Dimension4].[Attribute3])
Problem is that now I can't figure out how to get IFF condition to work. When I try to run the command error message appears saying "Too many arguments were passed to the IIF MDX function. No more than 1 arguments are allowed." I also tried to create new member on cube level by calculation script:
SCOPE (some hierarchy here which I'm still not clear on how to use);
IF [$Dimension4].[Attribute1] IS [$Dimension4].[Attribute1].&[False] THEN this = [Dimension4].[Attribute2] END IF;
IF [$Dimension4].[Attribute1] IS [$Dimension4].[Attribute1].&[True] THEN this = [Dimension4].[Attribute3] END IF;
END SCOPE
I also tried calculated member and named set but with no results.
I'm fairly new to SSAS and MDX but I hope you see what I'm trying to accomplish. Thanks in advance. Any help would be much appreciated.

Microsoft.AnalysisServices.AdomdServer.AdomdException in BIDS

We are using following MDX to create dynamic named set to generate future dates for one of our cube -
LASTPERIODS(100, STRTOMEMBER("[Calenar].[Calendar Date].&[" +
CSTR(FORMAT(DATEADD("D",100,[Forecast].[Date Recorded].CURRENTMEMBER.MEMBERVALUE),
"yyyy-MM-ddT00:00:00")) +
"]"))
Above query expression executes successfully in MDX Query Analyzer. But after cube is processed successfully, we are facing issue while browsing the cube and getting following error:
Error occurred retrieving name set: Execution of the managed stored
procedure DATEADD failed with following error
'Microsoft::AnalysisServices::AdomdServer::AdomdException
Internal Error : An external component returned an error (HRESULT = ).
The following system error occurred: Type Mismatch
Any help on this will be highly appreciated.
Referenced Link - MDX Named Set Rolling Date Range
Thanks,
Kinjal.
Do you have any null or "non-date" values in the [Forecast].[Date Recorded] members? Does this work when you run it as an MDX query on your cube?

Can i pass a parameter from a calculated member on a ssas 2008 cube to cognos report studio?

Can i pass a parameter from a calculated member on a ssas 2008 cube to cognos report studio? I know how to do this in Microsoft reporting sevices, but not Cognos Report Studio 10.1. I do not know the format the calculated member should be in, or how to get Cognos to recognize any parameters passed. Example: Say i wanted to pass the code below, that shows the top 25 accounts, but instead, i wanted to adjust it to have a variable / parameter that enabled me to adjust it at run time to say the top 10 accounts. Is this possible. I know i can create the code in report studio itself, but i would rather do it in the cube for performance and re-usability reasons. Here is a copy of this particular example and thank you!
TOPCOUNT( [Instrument].[Account Name].[Account Name].members,
25, [Measures].[Committed Amt])**strong text**
If I understood you correctly, you can do it in the following way:
Drag a data item into the query and use the embeded parameter (?prmTopCount?):
topeCount([Instrument].[Account Name].[Account Name],
?prmTopCount?, [Measures].[Committed Amt])
You can build a prompt page and define a textBox Prompt which uses existing prompt (prmTopCount).
I have also tried to write manual MDX in the report, but it looks it does not support macros embedded inside the manual written MDX.

Combining MDX and SQL datasets into one for a drill-through report?

Wondering if I could get some advice and direction on this following requirement:
Need to Create a SSRS report with two datasets, one MDX and one SQL. I then need to join those two datasets to create a third dataset which is to be used by a drill though report.
How can I combine those datasets into one and use that as a Dataset for a drill-through report?
Thanks!!
You can use a T-SQL stored procedure to combine the two datasets. It can't be done in the report itself. Call the stored procedure from the report to get the third result set that you need for the drillthrough report. Inside the stored procedure, you can use call an MDX query by using the OPENQUERY function. You'll have to set up a linked server on the SQL Server box that uses an Analysis Services provider, like this:
EXEC master.dbo.sp_addlinkedserver #server = N'AW2008', #srvproduct=N'SSAS', #provider=N'MSOLAP', #datasrc=N'', #catalog=N'Adventure Works 2008'
You can then wrap an MDX query in an OPENQUERY function, and select "columnns" from the function by referencing the column in double-quotes - like this:
select "[Measures].[Sales Amount]" from OPENQUERY(AW2008, 'select [Measures].[Sales Amount] on columns from [Adventure Works]')