ssas

How to execute a MDX query of SQL Analysis Server in C#

﹥>﹥吖頭↗ 提交于 2019-12-12 16:23:08
问题 I want to execute a SQL Analysis Query in C#. I have successfully connected to Analysis database using the below code: Server DM_Server = new Server(); Database AS_Database = new Database(); DM_Server.Connect(//SQL Analysis Server Connection String); AS_Database = DM_Server.Databases[//Database name]; I have a SQL query like SELECT FLATTENED PredictAssociation() From [Mining Structure Name] NATURAL PREDICTION JOIN (SELECT (SELECT 1 AS [UserId]) AS [Vm]) AS t 回答1: You need to use ADOMD.NET

Thoughts on dimension measures for BI

淺唱寂寞╮ 提交于 2019-12-12 14:46:25
问题 I am working with a consultant who recommends creating a measure dimension and then adding the measure dimension key to our fact table. I can see how this can make adding new measures easier by just adding rows instead of physically creating columns in the fact table. I can also see how this can add work to the ETL process, adds another join to the star schema, one generic column in fact table to hold all measure data etc. I'm interested in how others have dealt with this situation. We

MDX DRILLTHROUGH Fails but select can be successfully executed

两盒软妹~` 提交于 2019-12-12 14:18:59
问题 I have the following MDX query which succesfully returns the measure when executed - SELECT {[Measures].[Closed Quote OE Retail]} ON COLUMNS FROM Sales WHERE ( [Posting Date].[Date YQMD].[Month].&[11]&[2012] ,[Work Provider].[Code].[LV] ,EXCEPT([Item].[by Item Category by Product Group].[Item Category], [Item].[by Item Category by Product Group].[Item Category].&[OEM]) ,EXCEPT([Lost Sale Reason Code].[Code].[Code], [Lost Sale Reason Code].[Code].[All Lost Sale Reason Code].UNKNOWNMEMBER)

Connecting to a SSAS cube using R

房东的猫 提交于 2019-12-12 10:36:29
问题 Is it possible to query a SQL Server Analysis Services cube using R? I have this cube on a different external Server and i am working from my machine but i have admin privileges on the Server with my domain account. To put it simply, i want to create an alaysis services solution, suing some mining algorithm to examine data cotained in the Cube. I can do that with Excel, for instance, but i need to use R to take advantage of several interesting clustering algorithms different from those MS

Process SSAS cube through c# code

牧云@^-^@ 提交于 2019-12-12 08:17:01
问题 I want to use SSAS cube to get data from Dynamics AX and Pass data to wpf Devexpress PivotGrid. I am using following order in AX to create cube: Perspective-->View-->Query(with arguments) Now when I change the arguments of query everytime I have to Process the cube manually and render the data. I want that process to be done through c# code automatically. i had tried below code Server server = new Server(); server.Connect(cubeConnectionString); Database database = server.Databases.FindByName

MDX How to retrieve data based on the latest date

风流意气都作罢 提交于 2019-12-12 06:17:05
问题 How to retrieve data based on the latest date for that particular record only. SELECT [Measures].[Assessment Patients Detail] ON COLUMNS ,NON EMPTY ( [DimAssessment].[Assessment Text].&[Employee Wellness HRA] ,[DimAssessment].[Question Text].&[Do you use tobacco products?] ,[DimPatient].[Patient Key].[Patient Key] ,Generate ( [DimAssessment].[Answer Text].[Answer Text].MEMBERS , [DimAssessment].[Answer Text].CurrentMember * Tail ( NonEmpty ( [DimDate].[Full Date Alternate Key].[Full Date

Is there a way to change the default drill through behavior?

做~自己de王妃 提交于 2019-12-12 05:47:13
问题 It has been said there is no way to change the default drill through behavior with ssas . However, if we look closely we discover that we can actually exercise a bit more flexibility. currently double click opens a new sheets an populates data in it, but it is using some default fields rather than fields assigned in the Action . Is there a way to change the default drill through behavior using a code C# in which we define columns we want to show by default ? Regards . 回答1: I know it has been

ssas compound dimension key

僤鯓⒐⒋嵵緔 提交于 2019-12-12 05:36:53
问题 I'm using SSAS Visual Studio 2010. I have a dimension with a compound key pointing to a fact table. To begin with, the compound key contained three keys, and now I need to add a fourth. I did this in the DSV by clicking between the arrow between them and selecting the new fields from the dropdown menus. So far so good. I saved the DSV and reprocessed my cubes. Here's where the problem starts: I noticed only very minor changes in the relevant reports... I expected either wholesale changes or

How to get Last Selling Price in MDX

99封情书 提交于 2019-12-12 05:28:08
问题 Can MDX return the Expected Result as per code below? Have the data as per below : DATA: ItemID DateKey Price A 20151230 4.85 A 20150520 5.5 A 20150325 4.65 B 20140130 3 B 20141130 5 B 20150630 4.5 Wrong Result: ItemID DateKey Price A 20151230 4.65 B 20150630 3 Expected Result: ItemID DateKey Price A 20151230 4.85 B 20150630 4.5 WITH MEMBER [LastDate] AS tail (Filter([BI Dim Date].[Date Key].[Date Key],[Measures].[PRICE])).Item(0).name MEMBER [LastDateWithSales] AS Filter([MyTest].[PRICE].

SSAS - Return dates where no data exists

三世轮回 提交于 2019-12-12 05:15:40
问题 How, in SQL Server Analysis Services, how can I return rows of data for dates where no data exists? In this instance, ideally, I'd want to return the value of 0. In plain SQL, I would do this with a CTE. However, I'm still figuring out SSAS. 回答1: Right-click on your PivotTable and choose PivotTable Options. Select the tab labeled "Display". There is an option called "Show items with no data in rows". Put a check mark by that one. If you prefer zero then on the Layout & Format tab of that same