Quantcast
Channel: SQL Server Analysis Services forum
Viewing all 14337 articles
Browse latest View live

In which version of SSAS is the ISINSCOPE available?

$
0
0

I tried to look it up but didn't found it? I'm not just interested in the answer but also where should I see it :).

Thanks for the help in advance.


SSAS Cube Role

$
0
0

Hi All,

Please note that we created  a Cube using SSAS, cube is successfully process and data has been tested successfully, however we wanted to create a Dashboard using the Sharepoint PerformancePoint reading data from the cube, but this requires a Role to be created with sufficient privileges on the Cube, however when we create the role we received the below error once role is created and we check its properties (specifically Dimensions and Dimension Data):

TITLE: Microsoft SQL Server Management Studio
------------------------------

Deserialization failed: The 'AllowedRowsExpression' element in the 'http://schemas.microsoft.com/analysisservices/2011/engine/300/300' namespace is unexpected. (Microsoft.AnalysisServices)

------------------------------
ADDITIONAL INFORMATION:

The 'AllowedRowsExpression' element in the 'http://schemas.microsoft.com/analysisservices/2011/engine/300/300' namespace is unexpected. (Microsoft.AnalysisServices)

------------------------------
BUTTONS:

OK
------------------------------
 

Motaz Enany

Text measure SSAS Tabular

$
0
0

Hello everyone,

  I have a little problem in SSAS Tabular (I'm using Visual Studio 2015 and SQL Server 2016), if anyone can help me. I'll be thankful. There are my problem :

I got a table (dimension table) :

KeyName
1name1
2name2
3name3
4name4
5name5

And Fact table with

Key_Dimenson
1
2
3
4
5

And i want to create a measure that display in my fact table the column Name of my Dimension. The purpose is to display it like a measure in column of Power BI (using a matrix graph).

Can anyone help me please? 

Best regards,

AMAR


Reponse

SSAS presenting error of lack of support for ODBC

$
0
0

Guys,

I am migrating a model from 1200 to 1400 version and I am getting the following error.

Erro COM : System.Data; The .Net Framework Data Provider for OLEDB (System.Data.OleDb) does not support the Microsoft OLE DB Provider for ODBC Drivers (MSDASQL). Use the .Net Framework Data Provider for ODBC (System.Data.Odbc)..

The model uses a ODBC data source that works fine in the 1200 model but it is not working for 1400. Someone has experienced this kind of issue?

Help with SQL query

$
0
0

I am trying to calculate the following:

We have group bookings held in our system as blocks. Blocks are not considered reservations until they are picked up and a rooming list entered so what I can see from the query below is the total revenue held on the block per group by arrival and departure date.

The problem is that the revenue per group is the total revenue shown is that generated during the whole period the bedrooms are blocked for. This would be ok if each group arrived and left in the same month. However, there are groups that arrive in a month and leave on the following month.

I need to split the revenue for these groups by month. So, for example if a group arrives on 28/06 and leaves on 3/07, I need to know how much of that revenue is generated in June and how much in July.

The query below is correct but will give me total revenue based on EndDate (check out date), so it will all go to the month the group checks out.

Select Year(BeginDate) ArrivalYear,

DATEDIFF(DAY,BeginDate, EndDate)AS StayNights, 

DATENAME(month, BeginDate)ASMonth,

GroupRef,

GADescriptionAS Decsription,

GAStatusASStatus,

SourceSiteId,

BeginDateAS Arrival,

EndDateAS Departure,

CreatedTimestamp,

DefMarketSegmentCodeAS MARKSEG,

ProjectedRevenueAccomNettAS AccomREV,

ProjectedRevenueFBNettAS FBRev

From SyncGroupRoomBlockHeaders

WHERE 

CreatedTimestamp<'2019-03-21'

AND BeginDate BETWEEN'2019-03-21'AND'2019-12-31'

or

 CreatedTimestamp <'2018-03-21'

AND BeginDate BETWEEN'2018-03-21'AND'2018-12-31'

OrderByMonth(BeginDate)

Not able to Connect SSAS using IIS hosted url-->http://ipaddress/olap/msmdpump.dll

$
0
0

Hi,

We are currently using SQL Server 2008R2,IIS7.5,Windows sever 2008 R2.

We have done the Proper setup as per the guide lines but when we try to access SSAS using http://ipaddress/olap/msmdpump.dll and it is working perfectly fine when we access with Server name-->servername/instancename using SSMS.

getting the error :

The connection either timed out or lost (Microsoft.AnalysisServices.AdomdClient)

Is there a way to query SSAS Cube data from NodeJs ?

$
0
0

I am looking for a way to connect to MS SSAS from my NodeJs code .

Is there a way to implement this. Someone please help me with a sample or example code please.

SSAS/SSRS Query performance options

$
0
0

Hi there, I have a SQL 2016 SSRS report pulls data from SSAS tabular Cube on the same server. The report running way longer, can you please suggest any performance configurations/best practices for SSRS and SSAS side? These are newly built and both RS and AS sit on the same server. Also let me know how do I find out the query and tune them if possible.

Thanks


Process full only today edited date

$
0
0

Hello.. I have a large data datawarehouse

every hour the end user edit the data and check bi system again

the bi system based on pivottable connected to "ssas tabuler cube"

to get latest data i should process the cube full which take a lot of resources..

firstly I tried process defualt.. its fast but it seems useless .. it doesn't update anything

then I came other idea which is column round in the fact and create partition for each round... then processed full the last round via ssis but its not full auto since every round I should create new partition... also the round data is also huge and slow somehow

last thing I came with is column Edit Date in the fact and create partition for (Today data) 

SELECT [dbo].[PERSONS].* FROM [dbo].[PERSONS] where CAST([DATE] AS DATE)=CAST(GETDATE() AS DATE)

and create partition for (other dates data) 

SELECT [dbo].[PERSONS].* FROM [dbo].[PERSONS] where CAST([DATE] AS DATE)=CAST(GETDATE() AS DATE)

... then processed full the last (Today data) via ssis but as soon the date value become not today.. the data return as before process

any one has any idea how to only process last edited and inserted data without process full which delete full data and insert it again

DAX Query to calculate Days Sales Outstanding

$
0
0

I am having a problem with a DAX calculation in a tabular model I have set up in Analysis Services

I have a table of debts and a list of sales and I want to calculate DSO using the count back method.  All my sales and debts are tagged with the first day of the month to which they belong.  For example:

Total Debt 1st April 2013 £80


                  Sales

                   Debt

1st Apil 2013 £25

25

55

Reduced by 25

30

Days in April

1st March 2013 £30

30

25

Reduced by 30

31

Days in March

1st  February 2013 £20

20

5

Reduced by 20

28

Days in February

1st Jan 2013 £40

40

0

Fully paid this month - reduced by 5

3.875

Days in January

Total DSO (30+31+28+3.875)=

92.875

Calculation for January - debt fully paid off this month - but as we did not need all the sales for the month - need to calculate how many days sales this represents:

Sales in January

40

Days in January

31

Sales per day January

1.29

i.e 40/31

Debt paid off in January

5

Days equivalent

3.875

i.e. 5/1.29

I have been able to do this as SQL query – and my first though was to build a new table that calculated the DSO and held it as a number of days.  However this does not work as I need to be able to calculate the DSO on the fly as I need to be able to view this at a company, divisional and departmental level.  Ideally I would like to set this up as a calculated measure in my model so that it can be exposed to presentation tools such as powerpivot, powerview and performance point.  Has anyone done anything similar?   I have been banging my head off a brick wall with this one so any help would be greatly appreciated 

Many Thanks

Trying Process Tabular 1400 AMO Powershell

$
0
0


Hello:

I am trying to process a Tabular 1400 with Powershell using TOM, my code is like:

add-type -path "C:\Program Files\Microsoft SQL Server\150\SDK\Assemblies\Microsoft.AnalysisServices.Tabular.DLL"
$server = New-Object microsoft.analysisservices.tabular.server
$server.connect("servername")
$server.Databases["TabularDB"]
$db = New-Object Microsoft.AnalysisServices.Tabular.Model
$db = $server.Databases["TabularDB"]
$db.Refresh()
$db.Process()

$db.Refresh(): doesn`t do anything.

$db.Process(): shows: This command cannot be executed on database 'TabularDB' because it has been defined with StorageEngineUsed set to TabularMetadata. For databases in this mode, you must use Tabular APIs to administer the database.


What do i wrong?

Thanks

Automatic filter attribute member based on time condition

$
0
0

I am working with Multidimensional cubes in SSAS and analysed in Excel

Is it possible for an automatic filter to be triggered when certain years are displayed. For example, in a table of hospital data for YEARs 2010-2018, there is a HOSPITAL 'Hospital A' that does not have any ADMISSION measures for 2 years of 2017 & 2018. If any of those years are displayed (filtered on) then I would like Hospital A to be filtered 'off'. And filter 'on' if none of those years are then filtered off.

Deploy tabular project with SSDT 15.9.9 with compatibility level 1400. Error returned: 'Unexpected column name'

$
0
0

Hello,

I cannot deploy a Tabular project with SSDT 15.9.9 with compatibility level 1400 (with 1200 it works) in Analysis Server 14.0.239.1. I get the following error:

============================
Error Message:
============================

Failed to save modifications to the server. Error returned: 'Unexpected column name: Received column 'ObjectID.Expression' in rowset 'Annotations'. Expected column 'ObjectID.Set'.
'.
----------------------------
Failed to save modifications to the server. Error returned: 'Unexpected column name: Received column 'ObjectID.Expression' in rowset 'Annotations'. Expected column 'ObjectID.Set'.
'.
----------------------------
An error occurred while opening the model. Click Details for more information.

============================
Call Stack:
============================

   at Microsoft.AnalysisServices.Tabular.Model.SaveChanges(SaveOptions saveOptions)
   at Microsoft.AnalysisServices.Tabular.Model.SaveChanges(SaveFlags saveFlags)
   at Microsoft.AnalysisServices.BackEnd.DataModelingServer.CreateCatalog(String databaseName, Int32 localeID, DirectQueryMode directQueryMode, Int32 clientCompatibilityLevel)
----------------------------
   at Microsoft.AnalysisServices.BackEnd.DataModelingServer.CreateCatalog(String databaseName, Int32 localeID, DirectQueryMode directQueryMode, Int32 clientCompatibilityLevel)
   at Microsoft.AnalysisServices.VSHost.VSHostManager.OnNewProjectPrepareSandbox(Boolean isRealTimeMode, Int32 clientCompatibilityLevel)
   at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List`1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel)
----------------------------
   at Microsoft.AnalysisServices.VSHost.VSHostManager.PrepareSandbox(Boolean newProject, Boolean& isRefreshNeeded, Boolean& isImpersonationChanged, Boolean& saveRequired, List`1& truncatedTables, Boolean isRealTimeMode, Int32 clientCompatibilityLevel)
   at Microsoft.AnalysisServices.VSHost.Integration.EditorFactory.CreateEditorInstance(UInt32 grfCreateDoc, String pszMkDocument, String pszPhysicalView, IVsHierarchy pvHier, UInt32 itemid, IntPtr punkDocDataExisting, IntPtr& ppunkDocView, IntPtr& ppunkDocData, String& pbstrEditorCaption, Guid& pguidCmdUI, Int32& pgrfCDW)

============================

I have tested with a new project too. What's more, if I create a new project and set the workspace server to use the SQL Server, I receive the same error.

With Tabular Editor with compatibility at 1400 works fine and If I restore a Data Base with compatibility level at 1400 in the same SQL Analysis Server works also so I think the problem is in SSDT IDE. Do you know the reason?

Thank you in advance.

Nicolás.

Tabular Object Model (TOM) causes intermittent crash of SSAS Tabular 2017

$
0
0

Using the TOM to drop then recreate a SSAS Tabular databases can cause the following error which can only be fixed by restarting the SSAS service.

OLE DB or ODBC error: Communication link failure; 08S01; Shared Memory Provider: No process is on the other end of the pipe.
; 08S01.

   at Microsoft.AnalysisServices.Tabular.Model.SaveChanges(SaveOptions saveOptions)

Database is dropped using the code:

            using (var server = GetSsasServer())
            {
                var ssasDb = server.Databases.FindByName(databaseName);
                if (ssasDb != null)
                {
                    ssasDb.Drop(DropOptions.Default);
                    server.Update(UpdateOptions.Default);
                }
                server.Disconnect(true);
            }

A new connection is made to the server and the TOM database objects are created after which the call to SaveChanges is made.

It appears that there is an issue in dropping the old database and refreshing the connections before creating and deploying the new one.  Maybe use something akin to SqlServer's "with immediate rollback".

Once SSAS has been restarted the database deploys as expected.

SSAS2016(SP2): False DAX error when parsing INTERSECT() function

$
0
0

Note: This occurs within a measure definition not an evaluate statement.  (clarified 04 JUL 2018)

When using a string column MyTable[StringCol] the following DAX INTERSECT() function generates an error of: Intersect cannot work between string and variant column types

INTERSECT(
  VALUES(MyTable[StringCol]),
  UNION(ROW("TestCol", "Value1"), ROW("TestCol", "Value2"))
)

This is generated by the Tabular Object Model, TOM, and SSDT treats it as a genuine error.

However, the measure is valid and this is proved by using the TOM to deploy a model then executing code that exercises the measure containing the INTERSECT() function


Joining two SCD Type2 tables with 1:M relation with complex join & filter condition in SSAS Tabular model

$
0
0

Assuming, I have below two tables Department and Employee where I am storing data for different customers(tenants) and there’s one-to-many (1:M) relationship between these two tables (i.e. one department can have 1 or more employees)

However, let’s say both the tables are SCD Type 2 i.e. storing history with effective and termination dates. There are no constraints, indexes etc. created on these tables at database level.

Department table:
cust_id dept_id dept_name   efctv_dt    trmntn_dt   Dept_key
1001    D1      IT        12-01-2018    12-31-9999  1001D1
1001    D2      HR        01-01-2019    12-31-9999  1001D2
1002    D3      Admin     02-01-2019    02-28-2019  1002D3
1002    D3      HR+Admin  03-01-2019    12-31-9999  1002D3
1002    D4      Finance   02-01-2019    12-31-9999  1002D4

Employee table:
cust_id emp_id  emp_name    dept_id efctv_dt    trmntn_dt   Emp_key
1001    E1      XYZ          D1    01-01-2019   01-31-2019  1001D1
1001    E1      XYZ-A        D1    02-01-2019   12-31-9999  1001D1
1001    E2      ABC          D2    02-01-2019   12-31-9999  1001D2
1002    E3      AXBYCZ       D3    03-01-2019   03-31-2019  1002D3
1002    E3      AXBYCZ       D4    04-01-2019   12-31-9999  1002D4
1002    E4      DEFG         D4    04-01-2019   12-31-9999  1002D4

Columns cust_id & dept_id can be concatenated together as a separate column in both the tables as a key field and used as a join between both the tables.

Department Key=Concatenate(department[cust_id], department[dept_id] )

Employee Key=Concatenate(employee[cust_id], employee[dept_id] )

Example key output values= 1001D1, 1001D2, 1002D3, 1002D4

Now let’s say we have following reporting requirements, i.e.

To filter on Date Ranges (in visualization) - assuming there's another date dimension table with all dates & hierarchy

1) When no specific date range or filter selected - show all current active employee & departments names (where, trmntn_dt = 12-31-9999)
So, expected output is:

Emp Name Dept Name
XYZ-A IT
ABC HR
AXBYCZ Finance

2) When reporting for a specific month example - Jan-2019 - show all employees & department names active as of that month. So, expected output is:

Emp Name Dept Name
XYZ IT

3) When reporting for a specific Quarter example - Q1-2019 - show all employees & department names active as of that quarter. So, expected output is:

Emp Name Dept Name
XYZ-A IT
ABC HR
AXBYCZ HR+Admin

However, the join condition in AS Tabular model with 1:M relationship between these two tables would fail because the rows are not unique in the Department table (rows for D3), which is on the one side of the relationship.

If you include efctv_dt or trmntn_dt also in the concatenated join condition in both the tables as key for joining i.e.

Department Key=Concatenate(department[cust_id], department[dept_id] ) & Concatenate(department[efctv_dt],””))

Employee Key=Concatenate(employee[cust_id], employee[dept_id] ) & Concatenate(employee[efctv_dt],””))

Example key output values= 1001D112-01-2018, 1001D201-01-2019…

However, though now the rows would be unique since we don’t expect same row twice on the same day (unless some ETL issues like process ran twice on the same day etc.)

AS tabular model doesn’t allow to create complex join/condition (like in SAP BO Universe) so that we could add below condition when joining these two SCD type 2 tables as below which might help solve some of the requirements - something like below in the Where clause of the SQL:

    dept.cust_id = emp.cust_id
And dept.dept_id = emp.dept_id
And ( calendar_date is between efctv_dt and trmntn_dt 
        Or 
       trmntn_dt = ’12-31-9999’
    )

I think for creating/calculating any measure value is still doable with lots of examples available online on DAX to filter on the dates, but what about with just the dimensional attributes ?

Is this the right approach ? How to handle these? And, that too without using surrogate keys for generating unique values in each SCD type 2 tables and referencing it as FK/reference key from Parent->Child (1:M) i.e. Dept->Emp table.

Please suggest.

Thanks!

Reporting without History data available.

$
0
0

Hi,

I need help to build a solution.

1. we have Staging area from two different sources.

2. we do not have EDW, Data warehouse currently and no plan to build due to budget and resource constraints.

3. Currently we have 4 different DataMart's based on user group for reporting. Source to Staging to DataMarts are Weekly full refresh (please don't ask me questions on this topic, it can't be changed).

4. Now we have completely new business group asking for 17 different reports over 10 years of data. this time we are using Power BI for reporting (Previously SSRS).

5. Because there is no history (CDC) process, thinking of using SSAS tabular In-memory along with snapshots as of Quarterly data.

6. I was told to create a new DataMart again with 10 years data and use this new DataMart as source for SSAS to generate these reports. Most of the reports Q12019 vs Q12018. 2018 vs 2017 comparison.

Question: Anyone can recommend a good master plan in this scenario.

 

So far I have worked in a environment with proper Data Warehouse, Semantic layer, reporting with history. but this is the first time I need to work on reporting without history. first time to use SSAS.

Multiple message with "The 'XXX' dimension was not generated because it is bound to a user table".

$
0
0

Hello guys, I have a requirement to implement two different date Schema in the Cubes(SSAS) for my work. 1) with fiscal year Oct to Sep... 2) Calendar year  JAN to DEC I already have the fiscal year and is not trying to implement the calendar year.

I am trying to create a new date dimension for calendar year but each time I try I get a bunch of error in Visual Studio. I have attached the image for your reference. Can some please tell me why I cannot do this. 

Any suggestion is greatly appreciated.

MDX running very slow when give a different value of the same attibute

$
0
0

Can you please help my MDX query?

Here my MDX query and it took a very long time. But I completed very quick if the value change to 1 or something else in below highlighted part.

WITH

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Account Order]AS

       [Service Account].[Service Accounts].CurrentMember.Properties("Account Order")

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Account Format]AS

       [Service Account].[Service Accounts].CurrentMember.Properties("Format")

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Account Colour]AS

       [Service Account].[Service Accounts].CurrentMember.Properties("Colour")

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Account Hidden]as

       [Service Account].[Service Accounts].CurrentMember.Properties("Hidden"

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Account ID]as

       [Service Account].[Service Accounts].CurrentMember.Properties("KEY0")

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Account Code]as

       [Service Account].[Service Accounts].CurrentMember.Properties("account code"

------------------------------------------------------------------------------------------------

MEMBER [Measures].[Service Account]as

       [Service Account].[Service Accounts].CurrentMember.Properties("Caption")

------------------------------------------------------------------------------------------------

 

SELECT

{

       measures.[Service Amount],

       measures.[Active Service Flag],

             

       measures.[Account ID],

       measures.[Account Code],

       measures.[Service Account],

       measures.[Account Order],

       measures.[Account Format],

       measures.[Account Colour],

       measures.[Account Hidden],

       [Measures].[Active Service Count]

 

}

on 0,

(

      filter([Service].[SNN].children, [Measures].[Active Service Flag]>0),    

       [service].[service name group].children,

       [service].[service class].children,

      

//     {[Calendar].[calendar month].members - [calendar].[calendar month].[all]}, -- Calendar

      

      filter(

             Descendants([service accounts].[level 02].members),

              [service account].[service accounts].currentmember.properties("Account Group") = 'Finance Report'

             and not [service account].[service accounts].currentmember.properties("Hidden")

       )

)

on 1

from [Service Impact Cube]

where

(

    STRTOMEMBER('[Service].[Contract Code].&[2]',CONSTRAINED)

    ,STRTOMEMBER('[Service Account].[Contract Code].&[2]',CONSTRAINED)

    ,STRTOSET('[Calendar].[Calendar].[Calendar Month].&[2019-02-01T00:00:00]',CONSTRAINED)

   

)


Shawn



Adding Calendar year to Date Dimension SSAS Cube

$
0
0

Can someone please help add calendar year to a date dimension I already have fiscal year. My requirement is to have both Fiscal and calendar year. I already have Fiscal year running from Oct to Sep.

Any help would be greatly appreciated

Viewing all 14337 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>