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

When to use MDM and Tabular model?

$
0
0

I am working on tabular model in sql server 2012 RC0. But I am not sure when to go for tabular model and when to use multidimensional model. Can you provide me some points based on which we can decide which model to use? And which model has more advantage than the other one in which scenarios?

Thanks in advance. 


Incorrect SUM in Measure

$
0
0

Hi,

We are experiencing some strange behaviour with a SUM aggregate on a measure that is not showing the correct total.

Of a certain product we have 19 sales on one period. They have prices of 1.36, -1.36 and 0. These effectively cancel each other out, so the sum should be simply 0.

YearMonth

INN_FEE_incl_VAT

201403

1.36

201403

1.36

201403

1.36

201403

1.36

201403

1.36

201403

-1.36

201403

-1.36

201403

-1.36

201403

-1.36

201403

-1.36

201403

0

201403

0

201403

0

201403

0

201403

0

201403

0

201403

0

201403

0

201403

0

WITH  MEMBER [Measures].[YearMonth] as [Time].[Month].Member_value

      MEMBER [Measures].[CNK] as [Product].[CNK].Member_value

SELECTNONEMPTY

{     

       [Measures].[YearMonth],

       [Measures].[CNK],

       [Measures].[INN Fee incl VAT]

                                 

} dimensionpropertiesmember_valueONCOLUMNS,

      NonEmpty({

              [Time].[Time].[Month].members

       } )

*

      NonEmpty({

              [Product].[CNK].[CNK].Members

       })dimensionpropertiesmember_value, member_captionONROWS

FROM DeliveryCube10

      cellproperties VALUE, FORMAT_STRING, FORMATTED_VALUE

However, a query with MDX returns us:

YearMonth         INN_Fee_incl_VAT

201403  -              4.4408920985006262E-16

And in excel we see a cell displaying -0.00 but who has a value of 4.4408920985006262E

What makes this even more bizarre is that it is not the only product with a price of 1.36 whose sales balance out to zero. There are others with far more occurrences which do give correct results. In the same column, in the same cube, same date dimension, but another product dimension.

The datatype in the SQL table is decimal(19,2) The datatype in SSAS is double The measure format string is #,##0.00;-#,##0.00 In the measure source format string I also tried #,##0.00;-#,##0.00 NullProcessing = ZeroOrBlank (but there aren’t any NULLS) InvalidXmlCharacters = Remove IsAgrettable = True is set on both dimensions

I created a minimal cube to eliminate all possible errors. So I have only one partition.

The error is not in the data itself; in SQL we have a SUM that is correct.

I am testing this on a SQL Server 2014 Developer Edition, Service pack 2 We are using the dimensional model (not tabular) On windows 2012 R2

Thanks for any help,

Jan

 

Decide on where to put a measure

$
0
0

Hello dears

Whenever i design a warehouse,I have problem on some decisions. one of these decisions is on where it's better (or standard) to put a measure.

i have an example:

suppose in my transaction sales system i have this table:

SalesRowIDproductstoreCustomerquantity   pricediscount

115 951001        2   103

215 201002        1   101

318 121001 6   21

i have a Some measures: "GrossSale"=quantity*price

"NewCustomer": if the customerid appeared in a SalesRowID, that row is a NewCustomer Row.

i have heard that its better to put GrossSale (which is a additive measure) on a new column in warehouse. but about the second one(NewCustomer) , which one is better to chose?is that true

1) put a dimension like "IfNewCustomer" which get values : 1,0?

2) make a query on my ssas cube and define it as a calculated measure?

Preventing CustomEvents from writing to log files

$
0
0

In MS Visual Studio Professional 2013, SQL Server Integration Services:
in SSIS packages, how do I prevent CustomEvents from writing to the log file without loosing critical event from the log file. My log files grow extremely large (sometimes up to 200 MB) with events that are not useful such as the example below.

Here is an example which keeps repeating itself:

CustomEvent: 2016-09-30 16:08:46.65
   Source: BC'22 1
   Name: OnPipelinePostComponentCall
   Description: Data flow engine has finished a call to a component method.
End CustomEvent

Difference between "Process Update" and "Process Full"

$
0
0

Hello,

I am trying to figure out what's the difference between "Process Update" VS "Process Full" when it comes to processing a dimension.

Since Process Full will bring the related Cube into unprocessed state, Process Update will be desirable, however if there's anything that doesn't get processed through update, Process Full may be a better option.

If someone knows the answer to this, let me know. Thank you!

calculated table - is it calculated on the fly, or is it cached

$
0
0

Hello,

I have a table with over 2 million records which I made a available in a tabular model. The model processes data instead of DirectQuery.

For one particular report we need to do a lot of aggregation, which makes the report a little slower. So my idea is to create a summarized table from which the reports would be based. Of course there are several ways to do so such as: a) Create table at the database level; b) Modify the query for obtaining the data in SSAS so it brings the data aggregated; c) Create a view at the database which SSAS would simple do a 'SELECT * FROM'; d) Create a calculated table

I wonder however if a calculated table (in a non-DirectQuery model) keeps cached data, or if performs the calculations on the fly. If it does, then of course the calculated table wouldn't serve my purpose and I would have to go for another option (probably b or c).

Nasty role based security problem

$
0
0

Hi all, 

I have role based security working for 3 roles ok but the last one doesn't. They all basically work in the same way, here is the script for one that works:

Filter  (
  [Financial Period].[Period].MEMBERS, 
  (StrToMember("[Person].[User Name].[" + UserName() + "]"), [Measures].[Bridge Person To Financial Period Count] )  )  +
Filter  (
  [Financial Period].[Period].MEMBERS, 
  (StrToMember("[Person].[Remapped User Name].[" + UserName() + "]"), [Measures].[Bridge Person To Financial Period Count] )  )

Here is the script that is faulty:

Filter  (
  [Job].[Job Code].MEMBERS, 
  (StrToMember("[Person].[User Name].[" + UserName() + "]"), [Measures].[Bridge Person To Job Count] ) )  +
Filter  (
  [Job].[Job Code].MEMBERS, 
  (StrToMember("[Person].[Remapped User Name].[" + UserName() + "]"), [Measures].[Bridge Person To Job Count] ) )

I can run the faulty script in an MDX query under my account to test it and it returns the expected results.

When I try to test the security the symptom I have is when connecting to the database it hangs. I use the profiler and it captures the following error "Server: The operation has been cancelled. The 'Job Code' attribute in the 'Job' dimension has a generated dimension security expression that is not valid. Server: The operation has been cancelled."

If I remove the script the role works fine.

So far I have tried (but doesn't make any difference):

1) droping the SSAS database and recreating it - this has solved odd problems in the past

2) changing the query that populates the bridge table so it has loads more rows - not sure if there is a data thing causing problems.

There is one further odd sympton I have seen. When I edit the scripts that work in BIDS, at the point you select the attribute in the drop down list that has the script, BIDS is immediate for the scripts that work. For the faulty script, when I select the attribute it takes 50 seconds for BIDS to respond and allow me to edit the script. What is BIDS doing at this point? Could it be linked to the problem?

Does anyone have any suggestions?

The only things I can think of are to:

1) delete and recreate the job dimension

2) delete and recreate the role

Thanks in advance for having a look at this


Brian Searle

Extract SSAS Role Permissions.

$
0
0

Hello,

I would like extract SSAS role permissions into table or excel or flat file.

My SSAS cube has more than 1000 cube roles.

Is there any way to extract role permissions?

Thanks,


Design Problem

$
0
0

Whenever i design a warehouse,I have problem on some decisions. one of these decisions is on where it's better (or standard) to put a measure.

i have an example:

suppose in my transaction sales system i have this table:

SalesRowID

productID

storeID

customerID

F_quantity

F_GrossSales

F_Discount

1

15

95

1001

2

20

3

2

15

20

1002

3

30

5

3

18

12

1001

6

12

1


 a Some measures: "NetSale"=F_GrossSales - F_Discount

"NewCustomer": if the customerid appeared in a SalesRowID for the first time , that row is a NewCustomer Row.

i have heard that its better to put NetSale (which is a additive measure) on a new column in warehouse,is that true?

 about the second one(NewCustomer) , which one is better to chose?

1) put a dimension like "IfNewCustomer" which get values : 1,0?

2) make a query on my SSAS cube and define it as a calculated measure?

is there any best practice or standard? or we always choose according to what we think is better to choose?

SSAS bim file XML schema

$
0
0
Hey,  I am working on a small project for SSAS versioning and need the schema for the XML that a model.bim file is converted to. Where do I get it? 

SSAS Date format dd.mm.yyyy of an nvarchar date yyyymmdd

$
0
0
[$5506016730509632.jpg] 

I have an table which is directly used in my SSAS Cube. I have the date field as nvarchar with date displayed as yyyymmdd.

Cube should be using the date field and display to user as dd.mm.yyyy

Kindly advice me on what to be changed in the cube level


ShanmugaRaj

SSAS: Calculations tab buttons are disabled / grayed out

$
0
0
I'm building a new cube and went to the Calculations tab. Most buttons (e.g. New Calculated Member, New Named Set, New Script Command, Delete, etc.) are disabled / grayed out. There is an error that reads... Unexpected error occurred: 'Unexpected internal error in the parser: -1055653418'

Some other tidbits... I have not attempted to build a calculation in this cube yet. I tried anew as well by spinning up a simple cube against Adventureworks DW went to the Calculations tab and saw the same.

Any thoughts on how to resolve this?

Many thanks!

U

New Field in Tabular Model Not Visible

$
0
0

Hi,

I had a table with three fields in my tabular model (TABLE_1)

  1. USER_ID
  2. USER_NAME
  3. JOB_TITLE

The data was queried from an Oracle database.  I needed to add a field for MANAGER, but that data lives in SQL Server.  I created a new query in SSMS using openquery to get the Oracle data and joined it to my SS data.  The resulting table has four columns:

  1. USER_ID
  2. USER_NAME
  3. JOB_TITLE
  4. MANAGER

So far, so good.  Since the existing table in my tabular model was from my Oracle datasource, I created a new table (TABLE_2) from the SQL Server datasource.  After importing the data, I recreated all the existing relationships between the other tables in the model and TABLE_1 on TABLE_2.  After that, I deleted TABLE_1 and renamed TABLE_2 as TABLE_1.  I then built and deployed the model.

The problem is that even though I can see the new MANAGER field in my newly renamed TABLE_1, the MANAGER field doesn't show up when I connect to the model using Excel.  Similarly, I don't see the MANAGER field when I try to add it to a display folder using the OLAP Pivot Table Extensions tools.

Any ideas as to why this isn't working?

Thanks!

SQL agent job not processing Cube Partition

$
0
0

Hi All,

I need to process a Partition in a Tabular cube. When I tried to process the partition Via SSMS (by Connecting to Analysis server-->Selecting the cube--> Selecting the table-->Right click and Process Partition-->Select the partition and Full process). It is working fine.

When I take the script of partition for process full(mentioned below) and run in the SSMS object explorer it is running fine. But when I use the same script inside a SQL Agent job and run it as a SQL Service Analysis service command with SQL Server Agent service account, it failed with error "Cannot query internal supporting structures for column" and mentioned a "TableName[Column]" in the cube because they are not processed.Please refresh or recalculate the table".

Below, mentioned is the sample script which is used.

<Process xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Type>ProcessFull</Type>
  <Object>
    <DatabaseID>DabaseID</DatabaseID>
    <CubeID>Model</CubeID>
    <MeasureGroupID>MeasureGroupID</MeasureGroupID>
    <PartitionID>PartitionID</PartitionID>
  </Object>
</Process>

Please suggest why this error is occurring only when it is executed via SQL agent job.

Cheers

Jim

SSAS Tabular Model - DB compression is not optimized.

$
0
0

Hi,

Currently i am using SSAS Tabular 2016.My SQL database size is around 174GB. After importing to my tabular model,the size came around 95GB. Tabular Database size is 83GB and 12GB is used as buffer. Ideally it should consume 1/10th size of SQL database.But currently it is consuming 55% of the database size.

Fact - 170GB.

Dimension- 12 Dimensions of total 3.5 GB

The Star Schema is used.

Server Details:

Server: Windows server 2012 R2

RAM: 128 GB.

I have used the below compression techniques in my model:

  1. DefaultSegmentRowCount :

Default is 8M.Changed it to 2M.

  1. ProcessingTimeboxSecPerMRow:

Default is -1.Changing it to 0 for maximum compression.

  1. Import Only Useful Columns:                
  2. Normalize Columns Lowering Count of Distinct Values:  
  3. Split High Cardinality Columns:
  4. Avoid DateTime columns, better to split time and date into two separate columns. Don’t store time down to milliseconds unless it’s really needed, and so on.
  5. Reduce Precision of Columns when possible

Need your help to compress the database.

Thanks!



Can not query internal supporting structure

$
0
0

Hi,

While creating partition in Tabular cube, getting an error  "Cannot query internal supporting structures for column Date[DateFilter] in the cube because they are not processed.

Just FYI - An agent job which calls the SSIS package and in that package C# code is used to create and process partitions.

This error is solved when I right click and do a processRecalc for the cube.

But the last step of the agent job is ProcessRecalc script as SQL server Analysis command which runs successful during the agent job execution. I checked the SQL agent Proxy ID access and it has access to run Analysis command.

Please suggest what may be the reason for the error or suggest the steps I can perform to find it.. Thanks much.. struggling with this for a very long time :(

Cheers

Jim

TMSL Create Multiple Partition

$
0
0

Hello,

I am using SQL Server 2016 and SSAS 2016.

I want to create this below TMSL createOrReplace command with single .xmla script.

How to merge this command in one xmla script ? So i can execute this script just once

{
  "createOrReplace": {
    "object": {
      "database": "Sales",
      "table": "Accounts",
      "partition": "Account_Week25"
    },
    "partition": {
      "name": "Account_Week25",
      "source": {
        "query": [
          "SELECT * FROM Table",
          "\t\t\t\t\tWHERE PERIOD ='16W25'"
        ],
        "dataSource": "SqlServer 2016"
      }
    }
  }
}

And this one :

{
  "createOrReplace": {
    "object": {
      "database": "Sales",
      "table": "Accounts",
      "partition": "Account_MONTHLY_Sept-2016"
    },
    "partition": {
      "name": "Account_MONTHLY_Sept-2016",
      "source": {
        "query": [
          "SELECT * FROM Table",
          "\t\t\t\t\tWHERE PERIOD ='16W34'"
        ],
        "dataSource": "SqlServer 2016"
      }
    }
  }
}

Performance difference between Integrated workspace and explicit AS server

$
0
0

Good Day!

1. Create Tabular Project with Integrated workspace on ordinary PC (64 bit, 8GB RAM)

2. Doing Analyze In Excel, create Pivot Table, all works very fast for us

3. Deploy a tabular model project on the server (IT department) and create  Pivot Table

Performance is not good (more slowly) against Integrated workspace. Is it normal because we've got net questions and things like that?

Or should I ask IT department to re-configure something? We've got an industrial SQL Server 2012 and test SQL Server 2016

Thank you

MDX to Filter when measure=0

$
0
0

I have a calculated measure Credit Score defined as:

IIF([Measures].[Weighted Credit Score] = 0, 0,  [Measures].[Weighted Credit Score] /  [Measures].[Amount])

However I need to exclude from the calculation\aggregation the [Measures].[Amount] when [Weighted Credit Score]=0:

Loan

Amount

Weighted Credit Score

Credit Score

1

100000

72000000

720

2

100000

68000000

680

3

100000

0

0

Sum Weighted Credit Score

140000000

Sum of Loans (that have score)

200000

Weighted Average Credit Score

700

I've tried a filter several ways and not had any luck. How else could I do this?


J. Way

how to deploy ssis packages to production, from dev to prod is there any way of scripts like cubes we can create xmla

$
0
0
i need different steps how to deploy the ssis pacakges to production like db's doesn't give access despite they don't know how to deploy so changing the configurations ,is there any way to generate scripts with configuration files
Viewing all 14337 articles
Browse latest View live


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