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

Tabular Models unloading from memory?

$
0
0

So the scenario we have is we have 4 front facing SSAS Tabular servers spread across a number of data centres to help us with worldwide geographic challenges and to provide redundancy.

We process a pair of new cubes overnight on a processing Server (no end users on this), we then SYNC these with the 4 front facing servers and a redundant processing spare. So we do 10 cube syncs (2 cubes on 5 servers)

This is all undertaken within a SSIS package by issuing a set of TMSL SYNC commands.

This has been fine for months moving both models in about 15 mins (models are 12gb and 15gb compressed)

We often see the servers taking a while to "spin up" the VMs are running in an uncontested mode so they have the requisite RAM allocated and aren't being starved in any way by the underlying tin. 

An example of this, is if we connect in SSMS we connect immediately but if we expand the Databases folder in the Object Explorer tree it can often take several minutes to give us the expanded DB list. If we monitor the server concerned we can see the RAM used by SSAS on the server spinning up from a fairly low level (CPU is often 15% during this phase) as it loads the two models. Eventually it reaches a footprint of about 52Gb (both cubes loaded with some overhead I assume) at which point it will start responding to queries.

This spin up delay seem to occur after a sync is undertaken for the first user that hits any given server, after that it seems to be fine. We do have some anecdotal evidence that if a server isn't active for a period we get the same "spin up" behaviour.

Does anyone have any ideas as to what might be causing this behaviour and or how we can prevent it?

regards

Steve


BI Addict!


MDX query - how to show values

$
0
0

Hi,

I am little bit stuck in my POWER BI report, where I get data from SSAS. My query is quite easy

SELECT
NON EMPTY {
(
[Common Period].[Year - Week - Date].[Week],
[Snapshot].[Year - Week - Date].[Week],
[Material].[GTIN-EAN].&[03600542244237]
)

} ON ROWS,


{[Measures].[SNP Forecast - CDC]

} ON COLUMNS



from [CUBE]

Problem is, that result shows caption text value week, but I need to show member name

I thought, that if I build query with dimension properties I will get correct result, but there is no difference..

SELECT
NON EMPTY {
(
[Common Period].[Year - Week - Date].[Week],
[Snapshot].[Year - Week - Date].[Week],
[Material].[GTIN-EAN].&[03600542244237]
)

} DIMENSION PROPERTIES MEMBER_NAME ON ROWS,


{[Measures].[SNP Forecast - CDC]

} ON COLUMNS



from [CUBE]

Any help will be appreciated.

Thanks


Percentage measure to return an average instead of total

$
0
0

I've got a measure that I'm using in a pbi matrix. Its currently just two values divided by each other giving me a percentage. However in the total column, instead of taking the total of the values and dividing them to get a total percentage, I'd like to get an average of the table percentages.

So the highlighted values are what I'd expect. The circled value I'd like to be different. In this case, it's just taking 583/605. Would it be possible to instead take (93.8+100)/2 and get 96.9%?

Any help would be appreciated. 

Cube processing suddenly failing with timeouts

$
0
0

We have a two cubes that previously had no issues being processed with the full option.

Suddenly the cube is now failing with timeouts.

I have narrowed it down to two particular measures, where it cannot even process a single partition on its own.

With nothing else running on the server, both SQLServer and SSAS run on same server.

If I attempt to process the above partition, activity monitor shows the query processes start up and almost immediately all of it goes to runnable, suspended with PageIOLatch_SH, CXPACKETS and SLEEPTASK. 

No other activity, they all just sitting around waiting until it times out.

On the server itself, there is no activity, idle cpu and memory to spare.

I have checked the queries, the plan dont indicate any tempdb spills or missing indices.

I have rebuilt all the indices including columnstores.

Deleted the cube and redeployed.

The same data and cube deployment on the test server is fine.

We are running a virtual cluster of 2 servers.

Any ideas on what else to try would be welcome.

Thanks

Jon

Web Based Front End tool for SSAS cube browser

$
0
0

Hi All,

Can anyone suggest me the best web based Front End tool for browsing SQL Server Analysis Service cube??

A tool similar to the excel pivot table which we can add or remove measures and dimension or something like Office Web Component (OWC), But with rich UI and performance same as excel pivot.

To be more simple, Suggest me a Ad hoc reporting tool for SQL Server Analysis Service cube.

Currently we are using OWC, but OWC is not rich in UI and ease of user and more over i m not able to browse perspectives in the cube. I heard ProClarity is good but not going to be upgraded anymore.

Please suggest me the best tool.

Thanks in advance.




SSAS Common Dimension Processing

$
0
0

Hi Experts,

I have 3 Cubes, all in different solution (SSAS Multi Dimension) and are live on production.

All 3 Cubes have 10 Dimension in Common Plus Every cube/Solution have few Unique Dimension of their own.

As of now, we Process all 3 Cube Separately and all 10 Common dimension Process 3 times because all of them are part of 3 Cube.

Is their a way to process all common dimension only once and then Process Facts/Measure Group specific to their cube.

SSAS Extended Events - CPU Time vs Duration

$
0
0

What exactly is the difference between CPU Time and Duration in the extended events. 

I see a lot of cases where CPU Time shows up as say 130 ms and Duration shows up as 4100 ms or more. 

What exactly does that mean? 

how to perform partial cube processing without losing data.

$
0
0

Hi All,

I have cube where measure groups are partitioned into 2 partition for different time frame as below:

1. latest 2 years data ( PRT_DATA_2YEARS )

2. older data than 2 years ( PRT_DATA_REST )

By processing 1st partition ( with any of processing option ), How can I make sure to process/refresh only last 2 years of data? Meaning only latest 2 years of data will be updated and rest of the data will be intact.

Example: lets say actual data on database got updates for all years. and till now cube has not reflected those changes because it hasn't processed yet. Now we run cube processing job, that will update or fetch updated data only for latest 2 years in the cube. And rest of the data will be intact. There will not be any change in the cube data which is older than 2 years.

Request you to please help to resolve this.

Any suggestions/hints/trick are welcomed.

Regards




MDX row level calculation

$
0
0

Hi Everyone,

I have an MDX related issue which I cannot find a solution to and am hoping that someone here can help me (I'm quite new to MDX BTW). I have a measure group with 2 dates - Date1 and Date2 and a measure - Measure1. Date1 is connected through a many-to-many relationship to a date dimension named DimDate1 and Date2 is connected through a normal relationship to DimDate2.

I wish to do some type of row level calculation where once the user selects DimDate1.Date (DimDate 2 is hidden and cannot be selected) the following logic is applied: if DimDate1.date < DimDate2.date then set the row's Measure1 's value to 0. Once this is done, the value of Measure1 is summed up and returned back.

Basically through SQL it would be a simple join with a where clause stating date1 < date2. However to do this in SQL I would have to create a very large linked dataset and I'm hoping to find a solution in MDX.

Many thanks for your help.

Pierre

How to perform a new drill through from the drill through page ?

$
0
0

Hello,

We are managing accounting transactions in SSAS tabular, so we have Profit and Loss & Balance Sheet dimension and users can have all the detailed transactions for a specific account by using the "drill through" function in Excel.

I have a new requirement :

- Already, each accounting line have a common "batch" or "transaction" technical number, when users are doing the drill through on a specific account, they are able to all lines and this technical ID.

=> Now the requirement is that they would like to be able to click on this tech ID (like a drill through in the drill through) to see all the accounting lines that have the same ID

Do you have any idea how to do that ?


Thanks!

Get the "Grand total" with mdx ?

$
0
0
Hi,

how can i use the grand total of a measure to calculate with?

I tried something like [Measures].[MeasureName].xxx but i didnt found the correct one.

thank you.

Microsoft.AnalysisServices.Tabular.JsonScripter Issue

$
0
0

I'm trying to call Microsoft.AnalysisServices.Tabular.JsonScripter in my Powershell script to automatically generate CreateOrReplace database scripts for SSAS Tabular. But I keep getting the following error.

Script:

Import-Module SqlServer

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices.Tabular");

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices.Core");

$tab = "server";

$dbId = "database";

$as = New-Object Microsoft.AnalysisServices.Tabular.Server;

$as.Connect($tab);

$db = $as.Databases[$dbId];

[Microsoft.AnalysisServices.Tabular.JsonScripter]::ScriptCreateOrReplace($db);

Error:

GAC    Version       Location

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

True   v4.0.30319     C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.AnalysisServices.Tabular\v4.0_14.0.0.0__8...

True   v4.0.30319     C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.AnalysisServices.Core\v4.0_14.0.0.0__8984...

Exception calling "ScriptCreateOrReplace" with "1" argument(s): "Could not load file or assembly

'Microsoft.AnalysisServices.AppLocal.Tabular.Json, Version=14.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'

or one of its dependencies. The system cannot find the file specified."

At C:\Desktop\json.ps1:10 char:1

+ [Microsoft.AnalysisServices.Tabular.JsonScripter]::ScriptCreateOrRepl ...

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo         : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : FileNotFoundException

If someone can please help with this

Help with mdx query

$
0
0

Hi,

I am querying my database through SSAS for revenue by employee and project department.

Where the employee department = project department, I want to flag this as 1.

Where the employee department != project department, I want to flag the row as 0. 

Most of the examples I see with the iif function uses measures. Is it possible to compare dimensions this way?

I apologize for the poor examples. I was not able to post pictures as my account as I am a new member.

Employee departmentProject departmentAmount1Desired output/flag
Cost center 1Cost center 41000
Cost center 2Cost center 22001
Cost center 3Cost center 43000
Cost center 1Cost center 14001
Cost center 4Cost center 35000

Select


non empty([Dim Employee].[Org Cost Center Code and Name].[Org Cost Center Code and Name]
,[Dim Project].[Org Cost Center Code and Name].[Org Cost Center Code and Name])

on rows

,[Measures].[Amount1 (Fact GL Transaction)]

on columns

from
[Model]


MDX - Grand Total missing when filtering

$
0
0

I've been working on an ExcelDNA C# xll that allows users to enter simple words (under guidance) and I construct the elaborate MDX for them to query against a remote ActivePivot cube.

During testing I've ntoticed that when filtering, the grand total disappears (presumably it's joining tuples together). How do I still get a grand total? Do I need to use SCOPE or create a calculated member?

Thanks to more advanced MDX people to advise.

Example query generated by my code. Grand Total disappears:

 SELECT  
  NON EMPTY {[Measures].[Notional.SUM],[Measures].[Notional.SHORT],[Measures].[Notional.LONG] } 
  ON COLUMNS, 
  NON EMPTY HIERARCHIZE(FILTER(([CDR].[CDR].MEMBERS,[Book].[Book].MEMBERS),(LEFT([Book].[Book].CURRENTMEMBER.MEMBERVALUE,2)="22")),POST) 
  ON ROWS FROM [TraderCube] 
  WHERE ([Date].[Date].[2020-01-24])

MDX - Power BI, how to get a SUM total of MAX values

$
0
0

Hello,

I have a report connected to a multidimensional cube. Within this cube i have a MAX aggregation on a column which is working fine.

But in PowerBI i want to sum the max values as a total, but i can't get it to work. The total is the max of the values, which makes sense.

Since all options are blocked within powerbi to solve this, because i'm connected to the cube, i have to solve this within the cube itself.

Anyone a suggestion?


Microsoft.AnalysisServices.Tabular.JsonScripter output to a file insted of CMD

$
0
0

I have a script that allows me to script out DB script but i need to figure out away of saving the output into a .json file if someone would be able to help. I will be running the script into different DB's so I want it to create a .json file everytime with time stamp thanks for the help in advance

 [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.AnalysisServices");

$tab = "server1";
$dbId = "DB";
$as = New-Object Microsoft.AnalysisServices.Server;

$as.Connect($tab);

$db = $as.Databases[$dbId];

[Microsoft.AnalysisServices.Tabular.JsonScripter]::ScriptCreateOrReplace($db) 

How to change sort order of tables and attributes in SSAS Tabular?

$
0
0
In the Tabular Model Explorer, I can switch between Alpha Sort and Model Sort for tables and attributes.  But how do I actually CHANGE the sort order displayed in Model Sort?  I've tried everything I can think of via Code View, and I can't seem to get anything to stick when I reopen the model in Designer View.  If someone could provide me some guidance, it would be greatly appreciated.  Thanks!

Altering a named set to a cube without using cube designer

$
0
0

Hi forums, appreciate the help.

Is there a way to alter a named set on a cube without opening SSDT? 

Some possible ideas:

Could I update the named set with a 'simple' XMLA query that updates ONLY the named set and not the entire set of calculations?

Could I somehow populate the contents of the named set by having it reference a SQL table?


Thanks!


Exclude the last fact row of a sum measure

$
0
0

I have a fact table that have 2 columns, 'timeInEventA', 'timeInEventB'. These columns store the difference in seconds between the actual ticket and the next ticket.

Ex: If I have a 'eventA' at 2020/01/04 05:00:00, and the next ticket is 2020/01/04 05:01:10 the column 'timeInEventA' in the first ticket will have the value '70'.

There is the possibility of the ticket have neither eventA, neither eventB, so the two values in the fact table row will be 0.

This difference is calculated in the ETL and stored in the Fact Table.

Problem: The client will filter the period by day. So he will choose 'between 2020/01/03 and 2020/01/05 give me the sum of timeInEventA and timeInEventB'. But was decided that the last ticket of the filter will be excluded because the next event is outside the filter range. So what I can do to exclude the last row register of the sum?

My fact table have these 2 measure columns, a surrogate key to date dimension (ex: 20200103 ), a surrogate key for time with minute granularity( Ex: event occurred 05:03:22 will result in a 0503 surrogate key ), and a surrogate key to the customer dimension.

PS: In other website, I see a suggestion to have a sum measure pointing to the measure column, a lastvalue measure pointing to the same column, and a derived calculation that subtracts the lastvalue. But for this situation, this approach don't resolve. If my WHERE filter is 20200102 to 20200108, this approach will exclude all 20200108 values in the calculation.

Software to analyze trends in cubes/SQL?

$
0
0
Are there any recommendations for types of software that can determine trends across a selection of dimensions and measures in a cube and/or SQL server database?

I have a large number of dimensions that span across a bunch of measures in my cubes and I am looking for way to determine what is trending downwards and upwards without a lot of personal heavy lifting. 

Any suggestions?
Viewing all 14337 articles
Browse latest View live