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

Cube processing problem

$
0
0

Hi, can someone help me, please?

I have a problem with a cube process. I have an SQL SERVER 2014 installed with default instance. When I try to deploy my project I get an error "The name provided is not a properly formed account name". In "Impersonation information" I mentioned "Use a specific Windows user name and password" How can I fix this problem?


SSAS - Issue with Previous Year Calculation in the DAX

$
0
0

Hi All,

We are facing issue with previous year calculation while calculating the “Year over Year” calculations in the DAX.

We are using the below table for calculating the “Year over Year”  in tabular model:

Year

Quarter

State

City

Date

# of Product_Delivered

Year over Year Calculation:

Formula Definition for Q1 = (Total of “# of Product Delivered” in current Year for Q1  / Total of “# of Product Delivered” in previous Year for Q1) -1

Same thing applicable for Q2,Q3 & Q4

To calculate # of Product Delivered in previous year, we have tried with the following functions:

  1. PARALLELPERIOD :
    1. CALCULATE(SUM([# of Product Delivered]), PARALLELPERIOD(ProductTable[Date],-1,year))
    2. CALCULATE(SUM([# of Product Delivered]), PARALLELPERIOD(ProductTable[Date],-12,MONTH))
  2. DATEADD :
    1. CALCULATE(SUM([# of Product Delivered]), DATEADD(ProductTable[Date],-1,year))
    2. CALCULATE(SUM([# of Product Delivered]), DATEADD(ProductTable[Date],-12,month))
  3. SAMEPERIODLASTYEAR : =CALCULATE(SUM([# of Product Delivered]), SAMEPERIODLASTYEAR(ProductTable[Date))
  4. PREVIOUSYEAR: =CALCULATE(SUM([# of Product Delivered]), PREVIOUSYEAR(ProductTable[Date))

Issue:

We are able to get the previous year’s # of Product Delivered if we browse the tabular model by Date column only:   
         

But we are getting NULL values for # of Product Delivered if we browse with other columns like Year, State , City etc

Could you please help us finding what’s going wrong in the calculation here and please suggest new calculation which should calculate values against all the columns of the table.

Thanks,

Vishal Jharwade

Help on Dimension table Design using combination Key

$
0
0


Hello All,

Is that possible to do a combination key or what is that better suits my purpose, here is how data would be (the data granularity is Network)





Network IDNetworkGenreTypeSource
1TV1FamilyExternalV1
2TV1EntertainmentExternalV1
3TV1SportsExternalV1
4TV1NewsExternalV1
5TV1DramaExternalV1
6TV2SportsExternalV1
7TV2NewsExternalV1
Fact table
FctKeyNetwork IDSales ExpenseProfit
1TV115000100005000
2TV220000120008000




     

So if i look at the report the data should be

NetworkProfit
TV15000
GenreNetworkProfit
FamilyTV15000
Sports TV15000
 TV28000

So what kind of   relation better suits in my scenario? 





Connecting to a cube via a linked server

$
0
0

Hi

I want to connect to a SSAS cube via a linked server. When I ran a query against the SSAS cube from directly from the SQL server it runs fine.

If however I run the query in SSMS from my PC I get

OLE DB provider "MSOLAP" for linked server "SSASServer01" returned message "The following system error occurred: .".
Msg 7373, Level 16, State 2, Line 1
Cannot set the initialization properties for OLE DB provider "MSOLAP" for linked server "SSASServer01".

In the properties on the linked server I've defined an account to use for the connection to get round the double hop issue

Any Ideas why I'm still getting the error?

Alex

Mdx to return all rows from fact-table?

$
0
0

Hi!

I want to create a report in SSRS that executes a mdx to a SSAS cube.

The "problem" is that I want all fact-rows (no summary) for a particular period.

Example:

MyFactTable
-----------------
* FactKey
- TimeKey
- ProductKey
- StoreKey
Amount

Sample data:
FactKey, Timekey, ProductKey, StoreKey, Amount
1, 100, 10, 101, 500
2, 100, 10, 101, 600
3, 100, 10, 101, 800
4, 100, 10, 102, 700
5, 100, 11, 101, 600
6, 101, 10, 101, 400

Say i want to get all rows from this fact-table where TimeKey=100.

If I create a mdx like:
SELECT ProductKey*StoreKey on 0, Amount on 1 from MyFact
WHERE ...

i will get:
10, 101, 1900
10, 102, 700
11, 101, 600

but I want:
10, 101, 500
10, 101, 600
10, 101, 800
10, 102, 700
11, 101, 600

Is that possible (without using drill through)?

Need help to create calculated members in ssas cube.. any example or hint??

$
0
0

I'm working on SSAS cube and would like to build following Calculated members or create on MDX query is fine to produce this data in report.

It wuld okay, if you can give example based on AdventureWorks database, internet sales amt for products etc.

1. Total Transactions count Weekend Sunday (i’ve date dimesion which holds day_in_week=’Sun’ for respetive dates)

2. YTD Transactions = Transaction count year to date

3. YTD Days = Count of days within calendar year to date

4. Zero months in last 12 = Number of zero transacting months in the last 12 months rolling window

5. Consecutive zero months = Number of consecutive zero transacting months in last 12 months rolling window

Need any MDX experts advise..

Thanks,

Niel

Annualised Revenue - SUM of revenue for last 12 complete months SSAS mdx calculation

$
0
0

Hi,

I'm new to MDX world and currently enhancing ssas cube where i need to develop few calculated members or MDX query.

I’m trying to create calculated member in SSAS cube to get Annualised Revenue(SUM of revenue for last 12 complete months) for each of device(product). As a start created below MDX query, but its showing only device names, Annualised Revenue shows (null).

Any correction needed for this MDX Query? or appreciate, if someone can give me an example based on AdventureWorks cube. 

Here is my MDX query:

WITH MEMBER [Measures].[Annualised Revenue]
AS SUM(ClosingPeriod([Invoice Date].[Calendar Month].[Invoice Calendar Month],
[Invoice Date].[Calendar Month].[All Periods]).Lag(12)
: ClosingPeriod([Invoice Date].[Calendar Month].[Invoice Calendar Month],
[Invoice Date].[Calendar Month].[All Periods]),
[Measures].[Amount])
SELECT [Measures].[Annualised Revenue] ON 0,
[Terminal].[Terminal ID].MEMBERS on 1
FROM [cube_txn]

Do i need to add where cluase as “where ( [Invoice Date].[Calendar Month].[Invoice Calendar Year].&[2013])”

Whenerver it runs it should pickup current month as base and calculate for last 12 months revune

I am expecting results as below(ignore jan14 & Jan15):

deviceID    SumOfAnnualisedRevenue  Jan14   Jan15
---------   ----------------------  -----    ------
A10001      12,4500                5000    15000
A10003      45,50000               15000   78000
A10006      78,00                  12000   890
A10008      8,945                  450     120

Any help much appreciated.

Thanks, Niel

Need some clarifications

$
0
0

Hi,

I am currently building my first cube and I want to know what is the difference between the Quarter and the Trimester in the time dimension, quarter I can figure this one out but the trimester ??

Thansk


DAX - Year to Date Calculation

$
0
0

Hi All,

We have a requirement of calculating the Year to Date Calculation in DAX for No. of Sales. Below is the table that we are using:

Year

Quarter

Date

No. of Sales

 If we browse the tabular model with Year/Quarter then formula should calculate the value at quarter levels.

Formula Definition for Q1 = (Total of “No. of Sales” in current Year upto Q1  / Total of “No. of Sales” in previous Year upto Q1) -1

 

Formula Definition for Q2 = (Total of “No. of Sales” in current Year upto Q2  / Total of “No. of Sales” in previous Year upto Q2) -1

 

Formula Definition for Q3 = (Total of “No. of Sales” in current Year upto Q3  / Total of “No. of Sales” in previous Year upto Q3) -1

 

Formula Definition for Q4 = (Total of “No. of Sales” in current Year upto Q4  / Total of “No. of Sales” in previous Year upto Q4) -1

Can anybody help us in building this formula in DAX which should be able to browse with any columns of the table.

Thanks,

Vishal Jharwade


MDX Sum of YTD (returning NULL)

$
0
0

Hello,

I am trying to write what should be a simple MDX script as a CALCULATED MEMBER in SSAS 2012.  I am trying to create a measure that is a YTD Sum of Current Month Actual.

My Time Dimension is "FISCAL PERIOD" and is established as follows:

FISCAL YEAR = Year

FISCAL DATE = Date   (This is a date field that is just the 1st of every month)

The Key on this Dimension is FISCAL PERIOD which is in the format YYYYMM and is not assigned as a Time Field because I am not sure what to assign it to.

The Relationship for the Dimension is FISCAL PERIOD --> FISCAL DATE --> FISCAL YEAR

This Dimension has a relationship to the Measure via FISCAL PERIOD

The MDX for the Calculated Measure is:

CREATE MEMBER CURRENTCUBE.[Measures].YTD_Actual
 AS sum(YTD([FISCAL PERIOD].[Fiscal Date].CurrentMember),[Measures].[Current Month Actual]), 
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'VW BUDGET VS ACTUAL';

I am able to process the cube without error.  However, the YTD_Actual measure returns a NULL, even if I filter on a specific FISCAL DATE.

Anyone have any thought?

Steven



count key links to dimension

$
0
0

Hi all,

I have a fact table with a lot of production checks. The checks are all dimension tables with value 0 (rejected) and 1 (pass). For the moment I'm only interested in the rejects.

FactProduction: Factkey, LineNrKey, DateKey, Check1Key, Check2Key, ...Check30key, Weight

DimCheck1 , DimCheck2, ...

Fact table:

Factkey; LineNrKey; DateKey; Check1Key; Check2Key; ...;Check30key; Weight

1;2; 20150102; 0; 1; ...; 1;   0,250

1;2; 20150102; 1; 0; ...; 0;   0,253

1;2; 20150102; 0; 1; ...; 1;   0,248

Result should be:

columns: Weight/FactProductionCount/Check1Reject/Check2Reject/Check3Reject 

row Product110658/7450/30/18/22

Product27856/5000/25/3/10

...

What's the best way to achieve this?



Cube Synchronize fails

$
0
0

Hi

The SSAS cube synch fails with below error...

<Synchronize xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/analysisservices/2003/engine">
  <Source>
<ConnectionString>Provider=MSOLAP.4;Data Source=DB1.ancag.local;ConnectTo=10.0;Integrated Security=SSPI;Initial Catalog=MW_SSCCA;Connect Timeout=600</ConnectionString>
<Object>
 <DatabaseID>MW_SSCCA</DatabaseID>
</Object>
  </Source>
  <SynchronizeSecurity>CopyAll</SynchronizeSecurity>
  <ApplyCompression>true</ApplyCompression>
</Synchronize>

Error

Backup metadata traversal started.
Error -1056833535: Backup metadata traversal failed.
Server: The current operation was cancelled because another operation in the transaction failed.
Backup and restore errors: An error occurred while synchronizing the 'MW_SSCCA' database.
Execution complete

Can you please identify whats going with this...


Suman

customizing SSAS drill through action

$
0
0

Hi eb

Is there an easy way to customizing SSAS built in drill through action?

For example adding an export to excel option or exposing some of its fields as filters?

Of course a reporting action comes in to mind but i was wondering if there was any thing 

one could do with the drill through action instead of adding another technological layer to the solution?

TIA

Rea

Dynamic Bands on Fact Table measure

$
0
0

I'm trying to create income bands on my fact table, not sure how to go about it or if its possible.

I have a fact table that consists of

Date, TranType, AdvKey, AdvGrpKey, Amount

Each Adviser belongs to an AdvGrp. 

I want to be able to group on AdvKey or AdvGrpKey and have the summed amounts (income) allocated to income bands.

So when I group on Adviser, they will be assigned an income band, ie 0-10k, 10-50k, 50-100k, same applies when the grouping is changed to the Group Level.

The facttable has about 2 million rows.

The income is how much is generated from the advisers and adviser group, so this will change over time.

Can this be done and can it be done dynamically.

I can't think of any way to do it with a dimension, as there is no way to link back to the fact table.

Any ideas on how to solve this would be much appreciated.

Thanks

Jon

MDX count 1 if all Children have a 1

$
0
0

I have a Fact table (FactResult) that has 2 main dimensions - DimUsers and DimProcedureResult

The Dimension User has a Hierarchy - Client/Group/User

The Dimension ProcedureResult has  a Hierarchy - Condition/Procedure/Result. This dimension has a snowflake to DimCondition.

The Fact has a SK to each dimension and has 2 measure columns - ProcedureDone (0 or 1) and ResultDone (0,1)

I want to know how to build a measure and/or calculation to show the ProcedureValue and ResultValue to be 1 or 0 at the Condition/ProcedureResult level (leaves), but only be 1 at Condition level if all leaves are 1 and 0 at Condition level if one or more leaves are 0. All procedures done, condition is done. One or more procedures not done, condition not done.

Example:

UserSK, ConditionSK, , ProcedureResultSK, ProcedureCount, ResultCount

1,1,1,1,0

1,1,2,1,1

1,1,3,1,1

2,1,1,0,0

2,1,2,1,1

2,1,3,1,0

2,2,1,1,1

2,2,2,1,1

2,2,3,1,1

2,2,4,1,1

2,3,1,0,0

2,3,2,1,1

So, only 2,2 would have a 1 for condition complete for Procedure and Result. But, at the leaf level the others would show 1 if procedure done and/or result done.

Thanks,

Thomas


TheSmilingDBA Thomas LeBlanc MCITP 2008 DBA


Cannot access the powerpivot data modle thru BISM in Sharepoint 2013

$
0
0

Hi,

We’re currently using sharepoint 2013 and SQL server 2012 for publishing powerpivot report to users. We encounter the error in below scenario:

 

-Uploaded the powerpivot xlsx file to sharepoint as a datasource

 

-Created a BISM file pointed to that powerpivot tabular data model

 

-Granted the “Read” permission in document library to team members

 

-The team member right clicked the BISM file and chose “Launch in excel”. An error “Either a connection cannot be made to bi server, or Analysis Services is not running on the computer specified” was shown.

 

-If switched the user to the domain account which starts the SSAS service, Excel can be launched from sharepoint and connect to the tabular model without any error.

 

Could anyone help point me which steps we are missing or any permission we need to setup for users, eg. Sharepoint, SQL Server or AD?

Thanks.

 

Error opening Local Cube File in Excel 2007

$
0
0

Excel crashes, the only error given is "Microsoft PowerPivot Engine has stopped working"

Event viewer log is equally vague:

"The description for Event ID 22 from source MSOLAP$LocalCube cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Internal error: An unexpected exception occurred. Internal error: An unexpected exception occurred."

Local cube file is created using version 11 of Microsoft.AnalysisServices, using a relational sql data source connected via SQLNCL11.1. Excel is version 2007. OS is Windows 7 sp 1 64 bit. File is created succesfully, no errors.

Also baffling is that some members of my team can open this file successfully and others cannot (including myself). I can not find anything in common in regards to software installed on any of the systems.

Unable to generate Power View report out of Multidimensional report data source

$
0
0

Hi,

I have created 'Report Data Source' connection to point to Multidimensional cube on Share Point site. But when I try to create a new Power View report out of it, I get following error message : 

"An error occured while loading the model for the item or data source 'http://*********/PowerPivot Gallery/TestCube.rsds'. Verify that the connection information is correct and that you have permission to access the data source."

I can see following message in the <moreInformation> section :

<Source>Microsoft SQL Server 2012 Analysis Services</Source><Message>Errors in the metadata manager. The current model can only be expressed when the client is requesting tabular view metadata with VERSION restriction of 2.0 or later.</Message>

Following are the System configurations :

1) SSAS : SQL Server 2012 + SP2 (version 11.0.5058)

2) Share Point 2013

As mentioned in one of the MSDN documents this configuration supports creation of Power View reports on multidimensional cube.

Can any one suggest what might be the issue?

Thanks in advance!

Need help with the averages

$
0
0

Hi All,

Finally i found a solution. a) I have a time dim from the ware house and its joined to the fact table based on the dateid, since the fact table is getting only the data for the working days , the ware house time dim is showing only those days as count.

b) I created a new time dim in SSAS TIMEDIMSSAS

c) I joined the new TIMEDIMSSAS to the warehouse time dimension and the fact table and created new measure AvgWorkDone over time and Avg Rev over time.

I'm getting what i wanted. BUT here is a new problem , when i select multiple months the grand total (which should be Average is showing wrong average and i'm not sure why), can anyone please help ?

Row Labels AvgRevenue AvgWorkDone
1 $4.17 277.6801802
1368 $4.17 277.6801802
February 2014$1.59 105.7971014
January 2014$0.97 64.66666667
March 2014$9.52 634.5512821
Grand Total $4.17

277.6801802

The values were supposed to be (1.59+.97+9.52)/3=4.02 and NOT 4.17 for Revenue. Similarly for WorkDone (105.79+64.66+634.55)/3=268.33 and NOT 277.68

Please can some one suggest what is going wrong here?

Thanks



SV

DAX query to calculate distinct count respect to a column after a Filter function - SSAS 2012 Tabular

$
0
0

Hi,

I'm trying to build the dax query to determine the distinct count for a column returned by the application of a Filter function.

evaluate(
row("counter",
countrows(
filter(order_summary,
year(order_summary[change_date]) = 2013) )
)
)

I need to count the distinct values for an id returned by the Filter function.

Any helps, please? Thanks

Viewing all 14337 articles
Browse latest View live