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

MDX script editing error generated at each keystroke

$
0
0

When editing calculations in Script View, I find that, after a little while, the focus switches to the error tab. Now I have seen this reported elsewhere, but I have not been able to add to that thread. Closing the Error tab using Control-F4 is the easiest fix I have for this problem. I just discovered it, but don't know how long it will last before going wrong again.

Anyone know of a proper fix?


does AS tabular do any pre aggregations like multi dim does?

$
0
0
Hi we run sql server 2016 enterprise. We were having a discussion recently where one of the participants thought that AS tabular pre aggregates. perhaps in a fashion similar to the way Multi Dim does.  Is that true?   

Totals Not Showing for ParallelPeriod Calculation

$
0
0

I'm using the below expression for a year over year comparison

(PARALLELPERIOD([Dates].[Year].[Year],1,[Dates].[Year].CURRENTMEMBER),[Measures].[Totals])

This works fine at the detail level but does not display a value for the "Grand Total" in Excel. Could someone please tell me what I'm doing wrong. Thanks.

SQL SSAS not connect from powerbi

$
0
0

connect SSAS from powerbi desktop inside SSAS server by using localhost\instance name working.

while connect SSAS from powerbi desktop from outside server not connected.

even , using port number 

SSAS tabular: Unable to deploy without services restart

$
0
0

Hi everyone.<o:p></o:p>

Hope someone can help me with some problems I am experiencing with our SSAS 2014 tabular instances.<o:p></o:p>

It all started about 6 months ago where the nightly processing of our cube would not finish. No error message or nothing. It just kept on going until I cancelled the job and hereafter the cube was inaccessible. I had to restart the Windows server and then I could restart the processing job and the job would finish. This happened sporadically around once a week.<o:p></o:p>

I was (and still am) unable to find the source of this error. We upgraded to the then latest CU (12.0.5589.7), but that didn't help. What has helped is that I have rearranged the way we process our cube. There is one big fact table with just over 40 million rows. We process all other tables than this big table first and then process the big table by it self afterwards. This has done that the nightly processing job is running regularly.

But now another problem has arisen. When ever I have to deploy changes to our cube I have to restart the Analysis Services service. And it is not possible for me to restart it from SQL Configuration Manager. I must end the service from the task manager and then restart it from the configuration manager. If I try to restart it from the configuration manager, it just stalls half way through stopping and never stops. When the services has restarted I can deploy changes.<o:p></o:p>

Another problem is that before I restart the services I can’t rename, delete or in other ways change my cube.<o:p></o:p>

The funny thing is that I am experiencing these problems an both my development, test and production environments, so maybe its something with the way we have designed our cube.<o:p></o:p>

The cube is just over 2 gb in size.
The production environment has 64 gb RAM and the dev and test environment share 44 gb RAM.<o:p></o:p>

So my questions are:
- Have anyone experienced something similar and what have you done to get rid of these problems?
- 40 million rows should not be a problem for a Tabular cube should it?
- Is there any way to troubleshoot why the SSAS Service is locked and why it stalls in its processing and won’t finish?

Sorry for the long story.

<o:p>Regards,
Martin</o:p>

Analysis Services Partition Processing when Dimension Update

$
0
0

Hi,

I was having problems with my multidimensional cube, with the time that it took to process measure partitions. 

I had it partitioned by month, but split it out by day so that I could just process one day.  But now that I've done that, when I run a dimension Process Update, it takes forever to do "Processing Partition ___" on each of the 1,400 partitions.  I'm not quite sure why it even needs to run this, since I don't have it checked to Process Affected Objects.  I did add a Slice to each partition, setting the date key, if that makes any difference.

Not sure if I should merge some of the older partitions that are unlikely to be processed or queried much, or minimize my aggregations further or what.

Anyone have ideas?

SSAS 2017 Enterprise.  Daily partitions contain 1-2 million rows.

Thanks,

Scott


Scott

Tabular Model: Need a measure between StartDate and EndDate over DateDimension

$
0
0

Hello, 

Could you please help me figure out how to formulate the measure for CountStilLActive?  I have an old post but it wasn't answered.  Thanks.

Tabular Model> Measure: CountStarted (done), CountStilLActive (help on this), CountEnded(done)

CountStarted:=CALCULATE(DISTINCTCOUNT(FactTable[RecordNo],USERELATIONSHIP(FactTable[SK_StartDateKey],DateDim[DateKey]))

CountEnded:=CALCULATE(DISTINCTCOUNT(FactTable[RecordNo],USERELATIONSHIP(FactTable[SK_EndDateKey],DateDim[DateKey]))

CountStillActive:= ???



SSAS cube not processing all data.

$
0
0

I have ETL that loads all dimension and fact tables. Once that is complete, sql agent will kick off the cube processing via xmla script (process full). I am finding for one fact table in particular, the data is not being processed completely. Once I manually reprocess, it populates correctly. And it's different everytime. Sometimes I have data through August then others data through May. This is done in the middle of the night via agent. There have been known connectivity issues with the production server. I do not get thrown any errors when this happens. The cubes complete successfully, albeit with not the full data set. I have checked the logs to no avail. It happens sporadically. It had data missing day 1, 3, and 5 of the week. The other days processed ok.

Any suggestions?


Getting data from Azure Common Data Services into SSAS Tabular Model

$
0
0
Is it possible to get data from Azure Common Data Services into SSAS Tabular Model? SQL Server 2017 and/or Azure Analysis Services. I tried New Data Source wizard in SSDT but can't find a connector to CDS. Dynamics 365 Connector does not work. Power BI does support CDS with a preview connector but looks like it is not available to SSDT/SSAS?

Tabular DMV DISCOVER_CALC_DEPENDENCY isn't compatible with SUMMARIZE ?

$
0
0

When using SUMMARIZE in a measure's DAX expression, the resulting cube can't be object of DISCOVER_CALC_DEPENDENCY query.

Bug or 'feature' ?


ParallelPeriod not working when multiple filters are selected - SSAS MD

$
0
0

Hello - i am using this calculated member to calculate sales same period last year. It is working when i select a single month or a single year or a single quarter. However, when i select multiple months, it is showing strange numbers.

For example, if I select 2018 Jan, I see data for 2017 Jan which is what I expect. But when I select 2018 Jan and 2018 Feb, the calculated member is showing incorrect value. any idea how to fix this? 

CREATE MEMBER CURRENTCUBE.[Measures].[Sales Same Period Last Year]
 AS (ParallelPeriod(
[Date].[Calendar].[Year],
1,
[Date].[Calendar].CurrentMember
),
[Measures].[Sales]), 
FORMAT_STRING = "$#,##0;-$#,##0", 
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Sales';  

Calculated Measures using AMO

$
0
0

Hi,

Stuck again......

I am creating Dimensions, Cubes, MeasureGroups, Measures, Partitions using AMO dynamically. What I need now is to create Calculated Measures using AMO, which would use some aggregation between one or two measures of the cube.

I did not find any object that would enable me to work with Calculated Measures in AMO. It would be really helpful if I can get some code snippets on this.

Thanks and Regards

Vijay R

SSAS tabular model project

Average over time help

$
0
0

Hi All,

I am using the time dimension from my warehouse. I want to create an average over time measure and i am getting a message that i cannot as i didn't select the default time dimension provided by SSAS. Can anyone please tell me if there is a work around?

Thanks

DAX to find remainder row starting from current row

$
0
0

Hi All,

Cannot figure out how to write a measure for this?

I have data as follows

Date               InvAmt      SalesAmt         

20180821        1000         1500

20180814        1000           400

20180807        1000           600

20180801        1000          1100

I need a measure called NegativeWeek that gives me the date where the running remainder of InvAmt - SalesAmt starting from the current row went <= 0

e.g. For 20180814 InvAmt-SalesAmt = 600, we start here with 600 as Remainder, we calculate 20180807, we do 600 remainder - 600 (SalesAmt) = 0. So for 201808014, NegativeWeek = 20180807

For 20180807, InvAmt - SalesAmt = 400, we start here with 400 as Remainder, we calculate 20180801, we do 400 remainder - 1100 (SalesAmt) = -700, So for 20180807, NegativeWeek = 20180801

Hope i made this clear, the dates are descending (we start from a date and calculate remainder going back).

I cannot do this as calculated columns since the remainderAmt is dynamic based on which week we are looking at, to start calculating remainder.

Any help?

Thanks





Microsoft AdventureWorks: Order Price and Discount Calculations

$
0
0

Using the AdventureWorks database determine how the following columns are calculated within the SalesOrders table: LineTotal, UnitPrice, UnitPriceDiscount, OrderQty

In a section of an MS Word document explain all of the sources (some fields are always calculated and do not have sources) you found for the following fields.

               Line Total

               Unit Price

               UnitPriceDiscount

               OrderQty

For each of the sourced fields above, write a query like described in the “hint” above that explains how many ways that “source” is used to calculate the field. For example, there are multiple discounts applied to ListPrice (the source) to calculate UnitPrice. Another example: sometimes the SpecialOffer.DiscountPct is ignored. In the query, identify the number of rows of Wholesale and Retail sales order details to which the calculation accounts.

Hint: For Example, ProductListPrice is a source for SalesOrderDetail.UnitPrice. To figure out if there are calculations , write a query that 1) includes a field CalculatedListPriceDiscountPercent = ((ListPrice – UnitPrice)/ListPrice), 2) count the rows that use CalculatedListPriceDiscountPercent by doing a count grouped by CalculatedListPriceDiscountPercent, 3) include a field to identify Retail or Wholesale sales and grouping it in your query. That query will tell you 1) how many differences between ListPrice and UnitPrice are there, 2) will tell you what those differences are, 3) will tell you how many rows are affected, and 4) by including Retail or Wholesale sales and by grouping it in your query, you can tell what kind of sales are impacted.

I need to determine how each row is calculated for the SalesOrderDetails table until all rows from the table are accounted for. I would appreciate any help as I have been working this problem and am at a loss. Thank you for your assistance.



Create a calculation over days worked

$
0
0

I am trying to create a measure over days worked this week last year, how do I do that? I have them over the full week of last year but only need the days work.

Example;

sales were 100.00 on Monday this week, sales were 200.00 last week on Monday, how do I get just the day worked so far this week?

SUM(

WTD([Dim Date].[Calendar].CurrentMember),

([Dim Transaction Types].[TransCode For Sales].&[1],

[Measures].[Dollars Sold])

    )

Issue when trying to browse cube (SSAS 2014) from Excel 2013

$
0
0

Hi,

Users connect to cube and browse data in excel by making a template. daily users refresh this template to see new/latest data.

This solution is running since 1.5 years with some intermittent issues. now a days these intermittent issues occurring very frequent. And issues are: When user click on refresh all in excel.. first it takes some time(4-7 minutes) and then gives multiple and different errors as below:

1 . We could not get data from the internal source . Here's the error message we got: Server: The operation was cancelled because of locking conflickts.
2. A PivotTable, cube function ot filter control using the connection http__site.domain.company.com_OLAP_msmdpump.dll TESTDB Cube' didn't refresh.
3 . We could not get data from the external source . Here's the error message we got: Either a connection can not be made to the site.domain.company.com.server, OR Analysis services is not running on the computer specified.
4. The item could not be found in the OLAP cube.
5. xml parsing failed at line 1 column 9: DTD is prohibited

Users gets any of the above error intermittently. users are connecting cube through a middle website using msmdpump.dll.

We are not sure what to check or where this error belongs to as we can directly connect to cube in server and browse the same data. ANY help / clue / suggestion will be much appreciated.

Question about SSAS partition slicers

$
0
0

Hi all,

I have read a lot about partition slicers lately and wanted to try it out on my environment.

After using the profiler I noticed that in some cases all partitions were scanned, just like seen in several blogs.

My measure groups are partitioned at the level of the month using a "partitionKey" column that is based on the regular date ID in the fact table, e.g. " WHERE PartitionKey = 201801". Now, when looking into slicers I had the idea to include the MDX level [Date].[Month code].&[201801].

This is perfectly in line with the "PartitionKey" column. However, we also have a role playing date dimension called "Bookkeeping date" which is not perfectly in line with the regular date dimension, some days will be in the previous or next month.

In short, when chosing a slicer, I assume it has to be in line with the where clause in the partition query? Does this also mean that my cube requests will only be faster when the user uses the regular date dimension? If I have a slicer on the Date dimension, but the user choses the bookkeeping date (role) dimension it wont have a benefit?

Thanks in advance!

SSAS Dimension Usage (Measure Group and Cube Dimensions) Relationship Types and Implementation? Many-to-Many Relationship Question?

$
0
0

SSAS Dimension Usage (Measure Group and Cube Dimensions) Relationship Types

Hi All,

I was working on to extract Measure Group and Cube Dimensions Relationship Types metadata and got confused about Many-to-Many Relationship type implementation.

My Question is on Many-to-Many Dimensions: Can we have more than one Intermediate Regular Dimensions linked to Intermediate Fact Table and Fact Table?

1st will mention available Relationship Types and their description:

  1. No Relationship: The dimension and measure group are not related.

      

  1. Regular: The dimension table key column is joined directly to the fact table. A regular dimension relationship between a cube dimension and a measure group exists when the key column for the dimension is joined directly to the fact table. This direct relationship is based on a primary key–foreign key relationship in the underlying relational database, but might also be based on a logical relationship that is defined in the data source view. A regular dimension relationship represents the relationship between dimension tables and a fact table in a traditional star schema design.

      

  1. Fact/Degenerate: The dimension table is the fact table.Fact dimensions, frequently referred to as degenerate dimensions, are standard dimensions that are constructed from attribute columns in fact tables instead of from attribute columns in dimension tables. Useful dimensional data is sometimes stored in a fact table to reduce duplication.

  1.  Referenced: The dimension table is joined to an intermediate Regular dimension table, which is turn, is joined to the fact table. A reference dimension relationship between a cube dimension and a measure group exists when the key column for the dimension is joined indirectly to the fact table through a key in another dimension table, as shown in the following illustration.
          
 

A reference dimension relationship represents the relationship between dimension tables and a fact table in a snowflake schema design. When dimension tables are connected in a snowflake schema, you can define a single dimension using columns from multiple tables, or you can define separate dimensions based on the separate dimension tables and then define a link between them using the reference dimension relationship setting. The following figure shows one fact table named InternetSales, and two dimension tables called Customer and Geography, in a snowflake schema.


You can create a dimension with the Customer table as the dimension main table and the Geography table included as a related table. A regular relationship is then defined between the dimension and the InternetSales measure group.

Alternatively, you can create two dimensions related to the InternetSales measure group: a dimension based on the Customer table, and a dimension based on the Geography table. You can then relate the Geography dimension to the InternetSales measure group using a reference dimension relationship using the Customer dimension. In this case, when the facts in the InternetSales measure group are dimensioned by the Geography dimension, the facts are dimensioned by customer and by geography. If the cube contained a second measure group named Reseller Sales, you would be unable to dimension the facts in the Reseller Sales measure group by Geography because no relationship would exist between Reseller Sales and Geography.

There is no limit to the number of reference dimensions that can be chained together, as shown in the following illustration.


  1. Many-to-Many: The dimension table is joined to an intermediate fact table. The intermediate fact table is joined, in turn, to an intermediate regular dimension table to which the fact table is joined.

Example: I have to create a many to many relationship between Fact Table A and Dimension Table D. Let’s assume I have an intermediate Fact Table called C and Intermediate Regular Dimension Table B.

Intermediate Fact Table C is already having a regular relationship to Dimension D and Intermediate Dimension B. Also Fact Table A already has an regular relationship to intermediate Dimension table B. So Now Fact A and Dimension D have Many-to-Manu relationship.

In most dimensions, each fact joins to one and only one dimension member, and a single dimension member can be associated with multiple facts. In relational database terminology, this is referred to as a one-to-many relationship. However, it is frequently useful to join a single fact to multiple dimension members. For example, a bank customer might have multiple accounts (checking, saving, credit card, and investment accounts), and an account can also have joint or multiple owners. The Customer dimension constructed from such relationships would then have multiple members that relate to a single account transaction.



Note

To support a many-to-many dimension relationship, the data source view must have established a foreign key relationship between all the tables involved, as shown in the previous diagram. Otherwise, you will be unable to select the correct intermediate measure group when establishing the relationship in the Dimension Usage tab of Dimension Designer.

  1. Data Mining: The Target dimension is based on a mining model built from the source dimension. The source dimension must also be included in the cube.


https://docs.microsoft.com/en-us/sql/analysis-services/multidimensional-models-olap-logical-cube-objects/dimension-relationships?view=sql-server-2017



Viewing all 14337 articles
Browse latest View live


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