SQL Server Analysis Services (SSAS) is an online analytical processing (OLAP) and data mining tool in Microsoft SQL Server used as a tool by organizations to analyze and make sense of information possibly spread out across multiple databases, or in disparate tables or files. Analysis Services includes a group of OLAP and data mining capabilities and comes in two flavors - Multidimensional and Tabular.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have Write the DAX Function
See below
TotalDays = DATEDIFF([ChangeDate],TODAY(),DAY)
But same date giving 2 differents values
See attached Screenshot and see example
Change Date   TotalDays
12/09/2018     10
12/09/2018      2
Any idea appriciated
Starting with Angular 5
LVL 12
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

My company recently signed up for Azure SSAS and I'm testing out a few aspects of it.  I created a tabular cube that has 6,000,000 rows both in our on prem SSAS server and in Azure.  The on prem cube performs great.  The Azure cube does not.  A simple query to count the number of rows takes over 3 min in Azure vs. instantly in the on prem server.  We currently have the Basic B1 pricing scale which I've read should be more than sufficient for our needs.  Does anyone have any advice here on what I'm doing wrong?  It seems like this should be an issue easily addressed.

Below is screenshot of my dimension hierarchy and the browser window of the hierarchy. As you can see in the browser of the dimension in the cube, you can see all of the dates.

However, when I access this info in Excel, I can only see the latest date, which is 8-20-2018.

Dimension Hierarchy

Dimension Browser
I have a SQL task called TransferInfo inside of a Container with other SQL tasks.

Every now and then, it appears that only the TransferInfo task runs twice. The other SQL tasks in the same container only runs once.

Please advise!!!
Hi, we are using Azure Hybrid connection to connect to our internal SQL server from an Azure web app. This works without issue, however we now have a requirement to connect to an SQL Analysis Services database from Azure.

We have created a connection using the same hybrid connector install and the status is coming back as "Connected". In our web.config file we are connecting to the analysis server using the string      <add name="MyConnection" connectionString="Provider=MSOLAP;Data Source=SQLSERVERNAME:2383;Initial Catalog=DBName;" />

When we try to reference the connection string we are getting the error message "An attempt was made to access a socket in a way forbidden by its access permissions"

This same web page connects to the internal SQL server fine.

We have tried setting up logging, enabling debug logs for the connection manager and looking in the SQL xp_readerrorlog but cant see anything that stands out.

Any help in getting this to work would be appreciated.
I would like to know if it can be done in MDX or DAX for checking status in every date like the following.

I can build the cube based on the following data.  I would like to count the status for id 100,101,102 and 103 in each date.
   id      event_date      status
100      01/01/2018      Pending
101      01/01/2018      Pending
102      04/02/2018      Pending
100      07/02/2018      Not Granted
101      14/02/2018      Granted
101      18/02/2018      Pending
100      15/03/2018      Pending
102      01/05/2018      Granted
103      03/06/2018      Pending

I would like to have the result like the following: (in 2018-01-01: (Pending:100,101); 2018-02-04(Pending:100,101,102); 2018-02-07(Pending:101,102, NotGranted:100 )....
event_date      Granted      Not Granted      Pending
01/01/2018                      2
04/02/2018                    3
07/02/2018             1      2
14/02/2018      1      1      1
18/02/2018             1      2
15/03/2018                    3
01/05/2018      1             2
03/06/2018      1             3

Hi Experts


How would you edit the following formula to count only Distinct items nested within the containsrow function...


OHA_OHP = CALCULATE(COUNTROWS(Data),FILTER(Data,Data[CaseType]="Face to Face"), DISTINCTCOUNT(Data[WorkType]),CONTAINSROW({"IMA OHP OffSite","OHP OnSite","IMA Network OHP","OHP Review 30 Minutes", "OHP Case Teleconference call (40 mins)"},Data[WorkType]))
Problem statement: I am trying to do a writeback through .NET assembly stored procedure in SSAS - Multidimensional Cube

Are there any server level settings ? or any additional roles setting?

**Note: User is already an admin.

The .NET code works perfectly fine when debugged from the visual studio, the connection to the server works and the cube update also works.

1) When created an assembly using the dll file from .NET class library in the SSAS server, the calling of assembly stored procedure fails and throws error as follows;
a) Assembly Permission set : Safe/External Access
"Executing the query ...
Query (1, 6) Execution of the managed stored procedure UpdateCube failed with the following error: Exception has been thrown by the target of an invocation.Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed..
Run complete"
b) Assembly Permission set : Unrestricted
"Executing the query ...
Query (1, 6) Execution of the managed stored procedure UpdateCube failed with the following error: Exception has been thrown by the target of an invocation.An error was encountered in the transport layer.
The peer prematurely closed the connection..
Run complete"

Attached my .cs code which I build to obtain the dll file and then create an assembly on SSAS.
I decommissioned a database analysis server and need to move a tabular  model to a new server. I open the project in Visual Studio, change the workspace server yet when I try to compile I get "cannot build projects that contain more than one .bim file". There is only one .bim file in this project. Where is 2nd one?
We are switching to a DevOps local source control database environment.

In SQL Server Data Tools , In an Analysis Service project,  (I note there are no pre/post build events to take advantage of) is there a way to make DataSource Dynamic?

So when we deploy the cubes it takes the Environment into account.
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

I'm trying to write a conditional sum in MDX but its being applied to the whole instead of just applying to the criteria i specified. Does anyone know what i'm doing wrong?

WITH MEMBER [Measures].[PnLCalc] AS
  CASE [Voyage].[Vessel Tag].CurrentMember
  WHEN Instr([Voyage].[Vessel Tag].CurrentMember.Name,'ACCL') > 0 AND [Date].[Year].&[2018] 
  THEN [Measures].[PnL] + (150 * [Measures].[Net Days])
  ELSE [Measures].[PnL] END , FORMAT_STRING = "$#,##0;($#,##0)"  

SELECT  {   [Measures].[PnLCalc], 
							} ON COLUMNS,
						{ ([Date].[Month].[Month].ALLMEMBERS  ) } ON ROWS 
					FROM ( SELECT ( { [Date].[Year].&[2018] } ) ON COLUMNS FROM 
									( SELECT ( {  
															[Voyage].[Vessel Tag].[Vessel Tag].ALLMEMBERS,
																Instr([Voyage].[Vessel Tag].CurrentMember.Name,'FCCI') > 0
																Instr([Voyage].[Vessel Tag].CurrentMember.Name,'FCCBV') > 0
																Instr([Voyage].[Vessel Tag].CurrentMember.Name,'FCCSP') > 0																								   
																Instr([Voyage].[Vessel Tag].CurrentMember.Name,'ACCL') > 0
																Instr([Voyage].[Vessel Tag].CurrentMember.Name,'ACCBV') > 0
												} ) ON COLUMNS 
											FROM [cubeVoyageResults])) 
							WHERE ([Voyage].[Vessel Tag].CurrentMember, [Date].[Year].&[2018])

Open in new window

We are using SSAS 2016 Enterprise

We are building a mega cube with multiple companies data and we want to partition by Company.
We also will want to schedule separate ETL schedules for each company.

Question is in the event there is failure from a partition perspective will that take down the entire cube? In the event the data from one company goes wonky?

is it possible to connection Oracle OLAP , Oracle application server, Oracle BI answer and BI server to MS SQL ?

we are thinking about what if we just migrate Oracle DB to MS SQL DB and left the rest untouched.
Hi, I am connecting to SSAS data cube (tabular model) from Excel. This is company's operational data. I am wondering if there are any templates I can reuse to visualize data. What is the best place to start? Any books/video suggestions, other resources?

Thank you in advance.
Hello ,

I have a Tabular SSAS Model cube and have a measure that hours unused  percent like Hours Unused %:=(1 - (sum([CompletedHours])/sum([HoursLeft]))) * 100

In the table, I have area ie North, South, West and East. I also have Employees per area.

When I view the data in excel and in pivot view I see the Hours unused % showing correctly when I filter by an area but when I try to add in the employees into the rows it displays all employees not just the employees in that particular area.

I'm was looking to maybe use calculate table function, but I can't seem to get it right. Can anyone assist, please?

When communicating with SSAS msmdpump via SOAP requests Analysis services returns with Content-Types that are compressed and in binary XML (Content_type: xs+xpress).

We would like to include an extra layer of abstraction between the client and Analysis services and would like to know if there is a way to have Analysis services send back plain XML or how to read the xs+xpress content-types.
Is there a way in SSAS 2016 and the latest version of Excel 2016 to add a value to the Description property of a Dimension Attribute and have that render as a tooltip when hovering over it in Excel?
Hi I have a following formula which should be implemented using MDX
UnitMarketShare=(Territory Product Units/National Product Units)*100

Dimension Geography has Territory and country ; there are multiple Members in Country attribute and each country has multiple territory (1:1 relationship between territory and country)

I have to find the total Product units(for each product) for each country and then divide it with Territory product Units. I tried the following code but i am failing to keep the National level aggregation after pulling the territory.

with member as
[Geography].[Country].&[XYZ],[Measures].[Sales - Units])

 member measures.tabc as
([Geography].[Territory],[Measures].[Sales - Units])

member measures.ab as
([Measures].[Sales - Units]/

select [Geography].[Territory].[Territory] on 1,
{,measures.ab,measures.tabc,[Measures].[Sales - Units]} on 0
from [CLG_MultiSourceCube]
where [Geography].[Country].&[XYZ]

Following is the sample dummy data with desired output

Country    Territory   SalesUnits   TerritorySales   NationalSales   UnitMarketShare
XYZ              T1                  100                  100                 350                      28.57
XYZ              T2                  200                  200                 350                      57.14
XYZ              T3                  50                      50                 350                      14.28
ABC             T4   …
I have an excel 2016 pivot table that is using a data connection to an ssas 2012 Olap cube

When I try to add a timeline slicer I get the dreaded

We can't create a timeline for this report because it doesn't have a field formatted as a date

I do have an order date attribute that is defined as a date field on the dimCalendar table

I have done some research and found some possible causes

one possible issue mentioned is that the field may have blank or invalid dates.
(I double checked this is not the case in my data)

The other was that the field needed to have the

ValueColumn of the date key to use an actual date field from the underlying SQL table.  The KeyColumn is an integer and the NameColumn is WChar.  and to set the ValueColumn to use type Date

I validated this was true as well

Anyone have some other thoughts
CompTIA Cloud+
LVL 12
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

The attribute key cannot be found when processing: Table: 'dbo_FACT_PROD_QTY', Column: 'CONTRACT_RATE_KEY', Value: '0'. The attribute is 'CONTRACT_RATE_KEY'.
The attribute key was converted to an unknown member because the attribute key was not found. Attribute CONTRACT_RATE_KEY of Dimension: ContractRateLevel f

- I can process the dimension (ContractRateLevel), that the Fact table is pointing to with no problem.
- The dbo_Fact_Prod_Qty table does have Nulls in column Contract_Rate_Key.
- There are no Null values in the Dimension table: ContractRateLevel.

Can someone help, as I don't have this issue with my test cube, and the Fact table as NULL values for the same column.
I have an existing SSAS muti-dimensional data cube I'm trying to add another calculated member to.  I added a "parallelperiod" and that MDX query is working well.

(ParallelPeriod([Date].[FY-Hierarchy].[Fiscal Year],1,[Date].[FY-Hierarchy].currentmember),[Measures].[reseller sales amount])

Open in new window

My goal is to get the same calcualtion for Year-to-date(YTD). I'm trying to plug in YTD into that and I get #value! in excel.

(YTD(ParallelPeriod([Date].[FY-Hierarchy].[Fiscal Year],1,[Date].[FY-Hierarchy].currentmember)),[Measures].[reseller sales amount])

Open in new window

Any ideas on how to get YTD to work?
Hi Sir,

How to find  attribute name,level name and hierarchy name  of olap database usin AMO?

Hi Sir, I want to retrieve all prespective with in cube getting the error due to microsoft.analysisservices.prective is not getting.

Please help me.

I want Excel to prompt me each and every time for credentials each time i try to connect to the cubes. I don't want them saved ever.

Where does that setting live?
the two servers involved are sql 2014 and sql 2016
Our billing system is an OLTP database and it is very hard to report off of.   I have been reading on OLAP and ssas.  Is there a good manual or starting place for a rookie to try to overcome the reporting issues.
any ideas on should i start with trying to use ssas or creating an olap database from the online transactional database.






SQL Server Analysis Services (SSAS) is an online analytical processing (OLAP) and data mining tool in Microsoft SQL Server used as a tool by organizations to analyze and make sense of information possibly spread out across multiple databases, or in disparate tables or files. Analysis Services includes a group of OLAP and data mining capabilities and comes in two flavors - Multidimensional and Tabular.

Top Experts In