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

Getting Error: MdxScript(CubeName) (575, 33) The level '.&[Hero]' object was not found in the cube when the string, [product].[category].[bikes].&[Hero], was parsed.

$
0
0

Hi All,

I am getting this error when processing cube. I know that all the underlying Tables are empty (not having any data)

MdxScript(CubeName) (575, 33) The level '.&[Hero]' object was not found in the cube when the string, [product].[category].[bikes].&[Hero], was parsed.

When I checked Cube-Calculations found below scope which is causing this issue. 

SCOPE (measures.[sales amount], [product].[category].[bikes].&[Hero],
[Date].[Calendar].[Q4 CY 2002]);
THIS = ([product].[category].[bikes].&[Hero], [Date].[Calendar].[Q4 CY 2002]) *
1.3
END SCOPE;

I understood the reason of this error but not sure how to fix this? As my underlying tables are empty and so it is not able to find &[Hero] during process time and failing. But there is a possibility that tomorrow data related to Bikes Hero has been completely removed from underlying table and not going to be loading any more. In this case this scope will start throwing error. How to make sure even underlying data is there or not such SCOPE should not throw error?

I found this but not clear to me:

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/148bfc09-0af8-4c5d-9ab6-46758c138f98/conditional-mdx-?forum=sqlanalysisservices

SCOPE explained in nice Way:

https://www.sqlservergeeks.com/sql-server-implementing-calculations-in-ssas-using-mdx-part-3/ 


Thanks Shiven:) If Answer is Helpful, Please Vote


SSAS 2017 Can't Import any data

$
0
0

Whether I try to connect to a csv, an excel file, or sql server, using SSAS 2017 I can't process a single data source. It's all running on my local device, and I do have the 32bit ace engine installed to go with my 64 bit device. No matter what I connect to, I get

Failed to save modifications to the server. Error returned: 'OLE DB or ODBC error: We're sorry, an error occurred during evaluation..

'.

When I import the data using Power Query, I'm able to see it, manipulate it, everything works fine until I try to process it, at which point it bombs.

Any suggestions?


ParallelPeriod calculation for a measure for last year Quarter/Month

$
0
0

Hi,

I have a task to calculate Total for a measure for last year. I have the calculation working for regular Time/Time hierarchy but not for another Time Hierarchy with Current Year/Quarter/Month flags. The reason for adding that Hierarchy to Time dimension was to be able to use the Current Flag filter from PowerBI report with Live Connect. The Date attribute would be updated daily with flag value = 'Y' in the dsv yielding a dynamic Current and Previous year totals in the PowerBI report.

This is the Time Hierarchy for me in this cube.

Previous Year Total calculation which is working with Time.Time hierarchy - 

    SCOPE([Time].[Time].[Year].MEMBERS);                                   [Measures].[PY Book ResaleSALE]=([Measures].[Book Resale - SALE], [Time].[Current].&[],     PARALLELPERIOD([Time].[Time].[Year],1,[Time].[Time].CurrentMember));

    END SCOPE;    

    SCOPE([Time].[Time].[Quarter].MEMBERS);                                   [Measures].[PY Book ResaleSALE]=([Measures].[Book Resale - SALE], [Time].[Current].&[],      PARALLELPERIOD([Time].[Time].[Year],1,[Time].[Time].CurrentMember));

    END SCOPE;

But not working with Time.Current Hierarchy as - 

    SCOPE([Time].[Current].[Curr Quarter Flag].MEMBERS);                                   [Measures].[PY Book ResaleSALE]=([Measures].[Book Resale - SALE], [Time].[Current].&[],     PARALLELPERIOD([Time].[Time].[Year],1,[Time].[Time].CurrentMember));

    END SCOPE;    

    SCOPE([Time].[Current].[Curr Month Flag].MEMBERS);                                   [Measures].[PY Book ResaleSALE]=([Measures].[Book Resale - SALE], [Time].[Current].&[],    PARALLELPERIOD([Time].[Time].[Year],1,[Time].[Time].CurrentMember));

END SCOPE;

Is there any problem with this calculation, MDX itself or the SCOPE?

Any help is appreciated!!

Could not find Source Table Filter in SSAS 2016

$
0
0

Hello, I am trying to move OLAP cubes from SQL 2000 to SQL 2016, but couldn't find similar property for dimension "Source table filter". In SQL2000 I could apply such feature select needed elements in dimension.

But in SQL2016 the only way to filter elements in dimension is to create separate source view for each cube. Is it right or not? 

SSAS command on SQL agent fails.

$
0
0

while run below cmd in sql agent,

{

  "refresh": {
    "type": "automatic",
    "objects": [
      {
        "database": "SalesMartTabularLast3Months"
      }
    ]
  }
}


Error: Message

Executed as user: OJC\userX. Microsoft.AnalysisServices.Xmla.XmlaException: Invalid query syntax. A valid MDX or DAX query was expected.   at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForSoapFault(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)   at Microsoft.AnalysisServices.Xmla.XmlaClient.CheckForError(XmlReader reader, XmlaResult xmlaResult, Boolean throwIfError)   at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessage(Boolean endReceivalIfException, Boolean readSession, Boolean readNamespaceCompatibility)   at Microsoft.AnalysisServices.Xmla.XmlaClient.SendMessageAndReturnResult(String& result, Boolean skipResult)   at Microsoft.AnalysisServices.Xmla.XmlaClient.ExecuteStatement(String statement, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete)   at Microsoft.AnalysisServices.Xmla.XmlaClient.Execute(String command, String properties, String& result, Boolean skipResult, Boolean propertiesXmlIsComplete)  at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.ExecuteStatement(String stmt, StatementType stmtType, Boolean withResults, String properties, String parameters, Boolean restrictionListElement, String discoverType, String catalog)   at Microsoft.SqlServer.Management.Smo.Olap.SoapClient.SendCommand(String command, Boolean withResults, String properties)   at OlapEvent(SCH_STEP* pStep, SUBSYSTEM* pSubSystem, SUBSYSTEMPARAMS* pSubSystemParams, Boolean fQueryFlag).  The step failed.

Find the Distinct count

$
0
0

Hi,

I am trying to get distinct count of a particular column in every row using dax, count is also grouped by of the same column. and I want to do it without using summarized function of DAX and the output value should be stored in the same table.

For example-

ColumnA                    CalculatedColumn in Dax
A3
A3
A3
W2
W2
E5
E5
E5
E5
E5
B2
B2
Q1

Any help will be appreciated.

Thanks,

Akash

Can we implement Azure SQL Warehouse (MPP) as source for MDX (MOLAP) model in IaaS VM?

$
0
0
I am looking for the best practices for critical production environment with Terabyte scale MDX (MOLAP) model having Azure SQL Warehouse as a data source. Is it technically productive thing to use AZURE SQL WAREHOUSE as data source for cube running on a different VM(IaaS)? We are compelled by model size, hierarchies and custom rollup operations etc. to go for MDX model rather choosing tabular. I really appreciate your valuable suggestions! 

Aggregation Error

$
0
0

I am using Visual Studio Enterprise Edition 2017 with SSDT tool and while analysing I am facing error with Aggregation and that dialog box have a message "An error prevent the video from loading" with additional information "System.Drawing.Bitmap" method not found.

Also it has some detail like "Microsoft.Sqlserver.Management.UI.Grid.GridConstants.get_IntermidiateCheckBoxBitmap()"

(Microsoft.AnalysisServices.Controls)

If anyone knows please send a reply to solve this issue


Count of rows still in introductory period

$
0
0

Given the fact and dimension table below, we need to determine how many rows there are which are still in their initial 3 month intro period, given a date context.  So for example, if 2 subscription were sold on January 1 2018 and one on February 1 and the into period is 3 months, 3 subscriptions would be in their intro period on March 1  and one would still be in its intro period on April 1.  The fact table has dateID keys for the start and end of the intro period The fact table uses an active relation to the date Dim on the orderDateID and inactive relations on the other dates.  Would it be possible to create a DAX measure that counts the subscriptions that are still in their intro period when a given date is selected?  SSAS tabular.


CREATE TABLE [FactSubscription](
[SubscriptionKey] [int],
[ProductID] [int] NOT NULL,
[OrderDateID] [int] NOT NULL,
    [SubscriptionStartDateID] [int] NOT NULL,
[SubscriptionEndDateID] [int] NOT NULL,
    [IntroPeriodStartDateID] [int] NOT NULL,
    [IntroPeriodEndDateID] [int] NOT NULL,
[Amount] [decimal](18, 8) NOT NULL



CREATE TABLE [DimDate](
[DateID] [int] NOT NULL,
[CurrentDate] [date] NOT NULL,
[CurrentDateName] [nvarchar](64) NOT NULL,
[CurrentDayofWeekName] [nvarchar](64) NULL,
[CalendarYear] [int] NOT NULL,
[CalendarMonthName] [nvarchar](64) NULL



John Schroeder

MDX Question - Using Top Count with Rank/Order Function

$
0
0

How do I use a top count so it only returns the first 2 records with the highest sales for each sales territory group (North America, Pacific, etc...)

WITH 
   MEMBER [Measures].[Group_Ranking_InternetSales] AS
   RANK( [Sales Territory].[Sales Territory Group].CurrentMember,
   ORDER( [Sales Territory].[Sales Territory Group].[Sales Territory Group].Members , [Measures].[Internet Sales Amount], BDESC)
   ) 

   MEMBER [Measures].[Group_Territory_Ranking_InternetSales] AS
   RANK(( [Sales Territory].[Sales Territory Group].CurrentMember,   [Sales Territory].[Sales Territory Country].CurrentMember),
   ORDER( CROSSJOIN([Sales Territory].[Sales Territory Group].CurrentMember,  [Sales Territory].[Sales Territory Country].[Sales Territory Country]) , [Measures].[Internet Sales Amount], BDESC)
   ) 
SELECT 
      {
   [Measures].[Group_Ranking_InternetSales]
   ,[Measures].[Group_Territory_Ranking_InternetSales] 
   , [Measures].[Internet Sales Amount]
      } ON COLUMNS,
   (
           ORDER  ([Sales Territory].[Sales Territory Group].[Sales Territory Group], [Measures].[Group_Ranking_InternetSales] , BASC ) 
   ,ORDER  ([Sales Territory].[Sales Territory Country].[Sales Territory Country], [Measures].[Group_Territory_Ranking_InternetSales] , BASC ) 
   )
   ON ROWS 
FROM
      [Adventure Works]

The end result should be that it removes the highlighted row below.

enter image description here

Thanks!


How to make Analysis Services case sensitive

$
0
0
Is there a way to make Analysis Services case sensitive? I have a dimension attribute that has one value 'FireFox' and another 'Firefox'.  And they are causing duplicate key error.  I get these values from upstream data sources and don't have much control over it unless I greatly customize my code.

I'm looking for a way to set case sensitive in Analysis Services.  If this can be set at the attribute level, then it's preferred over setting it in the dimension level.  Like wise setting it at the dimension level is preferred over setting it at the data source view level.  Any one knows the answer?

SSAS - MDX - Last child from distinct count

$
0
0

I have a measure which is created as Distinct Count on column (Surrogate_Part_ID). It is OK, but I need in row "Sum" a value = 255 147, because now is returned distinct count for two days (21.10. and 22.10.).

So is it possible create calculated aggregation something as LastChild from distinct count? [Measure].[Distinct Count Parts].[LastChild] - is it possible?


SSAS 2012- Memory Issue when Executing Query

$
0
0

Hi Experts, 


I have concern executing MDX query on SSMS- connecting to Analysis server

Cube-Multi Dimension

Cube Size =  1 GB
Server RAM = 64 GB

When I execute the Query  Which is Cross Join of all 10 Dimension of my Cube and approx 15 Calculated Measure
I get to see an error something like "SystemMemoryOutofExection"

I need to understand - When Size of Cube is hardly 1 GB and we already have Server with 64 GB then how come we face Memory Issue.

I am assuming when MDX is executed against Cube then it consume RAM, and if number of Rows are more than it goes out of Memory ( based on above Error).
I cannot Change the Cross Join between 10 Dimensions because this is what Client hit anytime and they do not wish to see error.

How to over come this issue.

 

Could not create SSL/TLS secure channel. SharePoint 2016 SSAS List Data Other Feeds

$
0
0

Hi.  Our company recently got new servers.  Went from SharePoint 2013 to 2016.

We have SSAS tabular models that connect to SharePoint lists to retrieve data.  We have used the standard URL:

https://"OurServerHere"/_vti_bin/ListData.svc

and it worked fine on 2013.  But when modifying our models for the 2016 URL, we receive this error in Visual Studio 2015:

"Errors in the high-level relational engine. The following exception occurred while the managed IDbCommand interface was being used: The request was aborted: Could not create SSL/TLS secure channel..
An error occurred while processing the partition......"

The odd thing is the connection TESTs OK and we can see data in the preview.  But when trying to bring down the data/refresh the table, the error occurs.

Oh, another wrinkle... everything is working as expected in our Excel 2016 PowerPivot models with the SharePoint connections.

Analysis Services Cube backup to URL

$
0
0

We use a powershell script to backup of Analysis services cube, and execute it within sql server job, it works fine with  disk  as backup destination, but we want to backup to url which we backup of our production databases to url with credential based on shared acces signature. I want to know that how i use credential in my powershell script or how to create credential in analysis services or is there another way?

Param($ServerName=”localhost”)
$loadInfo = [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.AnalysisServices”) | Out-Null
## Add the AMO namespace
[Microsoft.AnalysisServices.BackupInfo]$serverBackup = New-Object ([Microsoft.AnalysisServices.BackupInfo])
[Microsoft.AnalysisServices.Server]$server = New-Object Microsoft.AnalysisServices.Server
$server.connect($ServerName)
If ($server.name -eq $null)
{
Write-Output (“Server ‘{0}’ not found” -f $ServerName)
break
}
$DBList = Get-Content “c:\SSAS\CubeList.txt”
Foreach($DBName in $DBList)
{
$DB = $server.Databases.FindByName($DBName)
if ($DB -eq $null)
{
Write-Output (“Database ‘{0}’ not found” -f $DBName)
}
else
{
Write-Output(“—————————————————————-“)
Write-Output(“Server : {0}” -f $Server.Name)
Write-Output(“Database: {0}” -f $DB.Name)
Write-Output(“DB State: {0}” -f $DB.State)
Write-Output(“DB Size : {0}MB” -f ($DB.EstimatedSize/1024/1024).ToString(“#,##0”))
Write-Output(“—————————————————————-“)
$BackupDestination=$server.ServerProperties.Item(“BackupDir”).value
#$BackupDestination="C:\SSAS"
$serverBackup.AllowOverwrite = 1
$serverBackup.ApplyCompression = 1
$serverBackup.BackupRemotePartitions = 1
if (-not $backupDestination.EndsWith(“\”))
{
$backupDestination += “\”
}
[string]$backupTS = Get-Date -Format “yyyyMMddHHmm”
$serverBackup.file = $backupDestination + $db.name + “_” + $backupTS + “.abf”
$serverBackup.file
$db.Backup($serverBackup)
if ($?) {“Successfully backed up ” + $db.Name + ” to ” + $serverBackup.File }
else {“Failed to back up ” + $db.Name + ” to ” + $serverBackup.File }
}
}
$server.Disconnect()

Thanks in advance for any replies



How to query number of users assigned to paricular SSAS model in last two months

$
0
0

Hi Team,

I have a requirement to fetch number of users Assigned to each SSAS Model in Last 2 months. From SSMS if I go to Model->>Roles-->Properties I can get all the users list but I do have 50+ models, its a time consuming and can't fetch with a time frame.

SQL SERVER VERSION: 12.0

SSAS VERSION: 15.0

Is there any MDX query which will give the details of the number of users assigned to each ssas model in last 2 months?

I have gone through all the DMV queries but didn't find any suitable query to fetch users. Any help would really be appreciated.


Thanks,

Aneel

RLS with Power BI Embedded and SSAS Multidimensional Options

$
0
0
Hi,
 
We're trying to do a POC with an web-app that will embed Power BI reports. When a user signs in, we want them to only be able to view the data that belongs to their organization. As a source we have a cube built with SQL Server Analysis Services Multidimensional. Embedding the reports are no problem. The problem is passing which user/organization is accessing the embedded report down to SSAS. I've found some posts about how to solve this with Tabular, but can't solve it for Multidimensional och everywhere I read I just see that this should be solved in the source, but not how.
 
Can someone explain this to me?

when I Create the roles in SSAS Multidemisonal not getting data metadata in under Dimesions in the tab.

$
0
0

Hi

when I Create the roles in SSAS Multidimensional not getting data metadata in under Dimensions in the tab. it showing that error retrieving children: either the user does not have the access to the cube or the database doesn't not exists.

Thanks

Saikumar

How to develop Data Mining Models in SSAS ?

$
0
0

Please share reference , guide or tutorial links to develop Data Mining Models  in SSAS.

errror when clicking on aggregations

$
0
0

I get the following error when clicking on aggregations, any project:

TITLE: Microsoft Visual Studio
------------------------------
An error prevented the view from loading.
------------------------------
ADDITIONAL INFORMATION:
Method not found: 'System.Drawing.Bitmap Microsoft.SqlServer.Management.UI.Grid.GridConstants.get_IntermidiateCheckBoxBitmap()'. (Microsoft.AnalysisServices.Controls)
------------------------------
BUTTONS:
OK
------------------------------

Any suggestions?

Thanks

Viewing all 14337 articles
Browse latest View live


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