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

Calculate average with attribute value

$
0
0

I need to create a measure that will return the average of the attribute below.

Example: 

Idade do Certificado Pessoa

10

20

30

The result that I hope is: 20

The only solution I could think of is to create a separate table that will contain this calculation and insert a new measure group into the cube. Can someone help me?


server

$
0
0
unable to establish connection to sql server, how to fix the erro ,continuously this error happaning 

What are the valid Stating and Ending dates to process the cube successfully...

$
0
0

Hello,

One of the customer entered the date in this format '0019-06-16T06:59:59.000Z' and the Cube is failing. When we update the date for '2019-06-16T06:59:59.000Z' the cube was able to process without any issues...

What is the Valid starting and ending Date for the cube to be processed without any error messages..

Thanks,

Raju

Can't Add Users to Role Manager

$
0
0

In an analysis service project when I try to maintain the list of users under the ROLES option I am no longer able to use the "Find Users" option.  When I click on the button the "Role Manager" dialog simply disappears.   I can use the "Add", "Add External" and "Remove" buttons, it's only the "Find Users" button that is not working.

I recently upgraded to the most recent release of SSDT:

Microsoft SQL Server Data Tools for Visual Studio 2017  (SSDT)
Version 15.9.10
VisualStudio.15.Release/15.9.10+28307.557
Microsoft .NET Framework
Version 4.7.03056

Installed Version: IDE Standard

Microsoft Visual Studio Tools for Applications 2017   00371-40000-00001-AA098
Microsoft Visual Studio Tools for Applications 2017

C# Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

NuGet Package Manager   4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Project   1.0
Information about my package

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Analysis Services   15.0.1300.108
Microsoft SQL Server Analysis Services Designer 
Version 15.0.1300.108

SQL Server Data Tools   15.1.61903.01040
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 15.0.900.30

SQL Server Reporting Services   15.0.1300.90
Microsoft SQL Server Reporting Services Designers 
Version 15.0.1300.90

SsmsVsIntegration   1.0
Information about my package

Visual Basic Tools   2.10.0-beta2-63501-03+b9fb1610c87cccc8ceb74a770dba261a58e39c4a
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Could not load file or assembly 'Microsoft.Data.ConnectionUI.Dialog'

$
0
0

I have problem connecting to the Microsoft SQL Server from SSAS Tabular project in Microsoft Visual Studio 2017 Community Edition. I created "Analysis service tabular project" in visual studio, then clicked on "Import from data source", choosed Microsoft SQL Server 2017, entered the server name but when I tried to verify the connection with "Test connection" option I got this exception:

============================
Error Message:
============================

Could not load file or assembly 'Microsoft.Data.ConnectionUI.Dialog, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. System cannot find given file.
----------------------------
Failed to connect to the server. Reason: Could not load file or assembly 'Microsoft.Data.ConnectionUI.Dialog, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. System cannot find given file.

============================
Call Stack:
============================

   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.PrepareConnectionObject()
   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.InitializeConnectionObject(String connectionIdentifier)
----------------------------
   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.InitializeConnectionObject(String connectionIdentifier)
   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.Open(String& connectionIdentifier)
   at Microsoft.AnalysisServices.BackEnd.RelationalDataSourceConnection.Open()
   at Microsoft.AnalysisServices.Common.DataSourceBasic.TestConnection()
   at Microsoft.AnalysisServices.Common.DataSourceBasic.ClickTestConnection(Object progressControl)

============================

I have no idea how to solve it since I have not found anything related to this about visual studio 2017. I will be thankful for every help.




SQL Agent's retry setting not working for Cube Processing failures

$
0
0

We have a SQL job running the cube processing for a dedicated SSAS server. Occasionally we get the 'Communication Link failure error' on that JOB step and have to manually re-start the step although there is the Retry Options setup correctly for that JOB step.

Can anyone tell me why this retry setting on SQL job not working in this case?

Is there a way for us to add retry attempt on the SSAS side or on XMLA so that we don't need manual intervention?

Please advise.

Getting error when trying to use "open query" with MDX . This is what I have created and ruining it in Analysis Server? what I am doing wrong!!! Please let me know. Thanks

$
0
0

 Select * from openquery (AzureDashboardAs,    <----- this is cube name -------
 'SELECT NON EMPTY 
{[Measures].[Above Threshold ACA TPID Count], 
[Measures].[New Acquisition ACA TPID Count], 
[Measures].[Recapture ACA TPID Count], 
[Measures].[Azure Customer Adds Lost Customers]} 

ON COLUMNS, 
NON EMPTY 
{[Account Information].[TPID].[TPID] * 
[Calendar].[Fiscal Month].[Fiscal Month] 


ON ROWS 
FROM [MODEL] 

WHERE( 
[Calendar].[Fiscal Date Hierarchy].[Fiscal Year].&[FY19]) )

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

This is an Error message:

Executing the query ...
Query (1, 16) The syntax for 'openquery' is incorrect. ((Select * from openquery (AzureDashboardAs,
 'SELECT NON EMPTY 
{[Measures].[Above Threshold ACA TPID Count], 
[Measures].[New Acquisition ACA TPID Count], 
[Measures].[Recapture ACA TPID Count], 
[Measures].[Azure Customer Adds Lost Customers]} 
 
ON COLUMNS, 
NON EMPTY 
{[Account Information].[TPID].[TPID] * 
[Calendar].[Fiscal Month].[Fiscal Month] 

 
ON ROWS 
FROM [MODEL] 
 
WHERE( 
[Calendar].[Fiscal Date Hierarchy].[Fiscal Year].&[FY19]) ))).
Run complete

Processing Cube in SSIS - how to process dimensions in parallel?

$
0
0

Hi there,

Can anyone please let me know how I can achieve parallel processing of dimensions using SSIS packages to reduce the processing time?

Also can we parallely process the dimensions and partitions together OR we always need to process dimensions before partitions.

Regards,


How cube processing works internally?

$
0
0

Hello ALL,

Can anyone please suggest good material /tutorial/blogs on how 'cube process' work internally like how it fetch data from DB, binding it to cube structure, aggregations etc.? while fetching data from DB , what other stuff process in parallel..

Regards,

SSAS Permissions - restricting dimension access

$
0
0

I have SSRS reporting set up from an SSAS cube. Reporting contains various dimension data including certain confidential items. I want to set up a role that doesn't have permissions to view the confidential data, but I want those users to be able to run the report and view it, just without those items. I've tried restricting access to the relevant dimension data but then the whole report is blank.

Example - Full report shows -

Name: John Smith

ID: 123456

Gender: Male

City: London

I want to configure the role so they can run the report and see everything except the name

Is this possible?

MDX query to loop and sum specific values from column and show only the highest sum

$
0
0

Hi, I'm new to MDX and trying to do the following and I have no idea where to begin or how to do it. So, I have a Dimension 'DaySlice' that is a 15 minute day slice from a day (00:00 - 00:14, 00:15 - 00:29 and so on) and a column called 'number_of_occurrences'. I need to sum number_of_occurrences by hour, meaning:

00:00 - 00:59 (4 day slices consecutive) = how many number_of_occurrences?
00:15 - 01:14 (4 day slices consecutive) = how many number_of_occurrences?
00:30 - 01:29 (4 day slices consecutive) = how many number_of_occurrences?

ans so on. At the end I need to show the interval where the max number of occurrences happened and the value of the max number of occurrences, for example:

|  interval       |  number of occurrences |
_________________________________

00:15-01:14   |       100.000                 |
_________________________________

 Sorry for not providing what I have already tried, but every result looks like nonsense

Who will be announced as the next SQL Server Analysis Services Guru? Read more about April 2019 competition!

$
0
0


What is TechNet Guru Competition?

Each month the TechNet Wiki council organizes a contest of the best articles posted that month. This is your chance to be announced as MICROSOFT TECHNOLOGY GURU OF THE MONTH!

One winner in each category will be selected each month for glory and adoration by the MSDN/TechNet Ninjas and community as a whole. Winners will be announced in dedicated blog post that will be published in Microsoft Wiki Ninjas blog, a tweet from the Wiki Ninjas Twitter account, links will be published at Microsoft TNWiki group on Facebook, and other acknowledgement from the community will follow.

Some of our biggest community voices and many MVPs have passed through these halls on their way to fame and fortune.

If you have already made a contribution in the forums or gallery or you published a nice blog, then you can simply convert it into a shared wiki article, reference the original post, and register the article for the TechNet Guru Competition. The articles must be written in April 2019 and must be in English. However, the original blog or forum content can be from beforeApril 2019.

Come and see who is making waves in all your favorite technologies. Maybe it will be you!


Who can join the Competition?

Anyone who has basic knowledge and the desire to share the knowledge is welcome. Articles can appeal to beginners or discusse advanced topics. All you have to do is to add your article to TechNet Wiki from your own specialty category.


How can you win?

  1. Please copy/Write over your Microsoft technical solutions and revelations to TechNetWiki.
  2. Add a link to your new article on THIS WIKI COMPETITION PAGE (so we know you've contributed)
  3. (Optional but recommended) Add a link to your article at the TechNetWiki group on Facebook. The group is very active and people love to help, you can get feedback and even direct improvements in the article before the contest starts.

Do you have any question or want more information?

Feel free to ask any questions below, or Join us at the official MicrosoftTechNet Wiki groups on facebook. Read More about TechNet Guru Awards.

If you win, people will sing your praises online and your name will be raised as Guru of the Month.


PS: Above top banner came from Ronen Ariely.

Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

NuGet BaseConnectionLibrary for database connections.

StackOverFlow
profile for Karen Payne on Stack Exchange

how to create variance for all the measures

$
0
0

In the cube I have lots of measures that I want to calculate the variance of

So if I have a measure called gross profit and I want something like 

I can do a scoping statement like

CREATE MEMBER CURRENTCUBE.[Measures].[Gross Profit]
 AS 
[Measures].[Value]

FORMAT_STRING = "#,##0;(#,##0)",
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Profits'

Scope(Descendants([Scenario].[Scenario Name].&[Fcst vs Actual],,SELF_AND_AFTER),[Measures].[Value]);  

This =
sum([Scenario].[Scenario Name].&[Fcst], [Measures].[Value])  -
sum([Scenario].[Scenario Name].&[Actual], [Measures].[Value])
;      
end scope; 

My issue is how can I do this if the measure was a calculated measure and it uses 2 different base measures from different facts like

CREATE MEMBER CURRENTCUBE.[Measures].[Total Gross Profits]
 AS 
[Measures].[Value] + [Measures].[Value2]

FORMAT_STRING = "#,##0;(#,##0)",

VISIBLE = 1 ,  DISPLAY_FOLDER = 'Profits';

I can't scope 2 values at once. 

This sample is simplified to try to get the question across. But in the actual system I have basically 7 fact tables with just on value column each and the calculations are using dimension hierarchies to calculate the measure's value like 

CREATE MEMBER CURRENTCUBE.[Measures].[TotalBikeSales]
 AS 
iif(isempty(sum([Product].[Product].&[Bikes], [Measures].[Value])),NULL,
sum([Product].[Product].&[Bikes]], [Measures].[Value])
), 
FORMAT_STRING = "#,##0;(#,##0)",
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Sales';


 

Filtering latest record on selected date

$
0
0

Hi, 

I need help on implementing below scenario.

I have Account Owner table having Account No., OwenerKey and OwnerkeyUpdatedDate and DimDate table.

Scenario : User can select any date from dim date table based on the selected date need to find out latest Account Owner 

Ex. AccKey OwnerKey   UpdatedDate 
      1          1                  15/3/2019
      1          2                  25/3/2019 
      1          3                  28/3/2019

If User selects date 30th March then OwnerKey should get : 2
If User selects date 27th or 26th March then OwnerKey should get : 1

Please can you help me with the DAX for calculating measure for this scenario.

Regards,

Pankaj

Conditional calculated measure in SSAS cube

$
0
0

I am having a problem with a calculated measure in my cube that depends on a formatted date dimension.  The user has specifically asked for the date in this format for the Excel pivot table, so I'm stuck with it.  My case logic returns the ELSE condition for every row, even for 2019 dates like [Date].[Formatted DD Mon].&[2019-02-01 00:00:00]&[01 - FEB].  It's obvious the ">" is not working in this logic, but I am not sure how else to compare the currentmember to the date range.

Can anybody point me in the right direction please?

CASE 

/* For all dates after 31-Dec-2018 */
WHEN  [Date].[Formatted DD Mon].CurrentMember.Name > [Date].[Formatted DD Mon].&[2018-12-31 00:00:00]&[31 - DEC].Name 
THEN  ([Measures].[A]+[Measures].[B]) / ([Measures].[C]-[Measures].[D]-[Measures].[E]) 

/* For all dates prior to 2019 */
ELSE
([Measures].[F] + [Measures].[G] + [Measures].[H]) / ([Measures].[I] + [Measures].[J])
END


Grand Total for Last-Non empty showing NULL

$
0
0

Hello Everyone,

My MDX grand total is working when there is existing data(eg. 2018-12) , but showing null for 2020-05 when there is no data.

I have succeeded in creating a last non empty mdx for all the levels(month,quarterly and yearly) but when i am slecting all the years my grand total is showing "null" and it is obvious that for 2020 i dont have any employee data so grand total will automatcially show null. Could someone please check my MDX below and suggest me where i am going wrong.

([Kalender].[Kalender Hierachy].[Quarterly].members,[measures].[Employees]= TAIL(EXISTS(EXISTING([Dynamic Month],[measures].[Employees]),1).item(0)

([Kalender].[Kalender Hierachy].[Year].members,[measures].[Employees]= TAIL(EXISTS(EXISTING([Dynamic Quarter],[measures].[Employees]),1).item(0)

([Kalender].[Kalender Hierachy].[ALL],[measures].[Employees]= TAIL(nonempty([Dynamic Year],[measures].[Employees]),1).item(0)

Dynamic Month:  ([Kalender].[Kalender Hierachy].[MONTH].Members

Dynamic Quarter:  ([Kalender].[Kalender Hierachy].[Quarter].Members

Dynamic year:  ([Kalender].[Kalender Hierachy].[year].Members

Thanks in advance.

Kind Regards

Mah

Displaying the dimension members (ssas multi dimensional) in sequence

$
0
0

I am trying to display the members in displaying folder in the sequence as my client expected but I couldn't make it.

I have a dimension called 'Products' which has members listed as follows in the sequnce

  • State
  • LOB
  • Product Name
  • Plan
  • SA_INT
  • ProductType
  • PlanStatus
  • Funding
  • PriorBidID
  • Marketing Name
  • PrimaryNetwork

when I deploy the cube, users are able to see the members in Product dimension in the sequence as follows..

Funding, LOB, MarketingName, Plan, PlanStatus, PrimaryNetwork, PriorBidID, ProductName, ProductType, SA_INT, State

Could you please suggest me the work around to accomplish the sequence of dimension members as client provided above?

Thanks

Venkata Vempati

Using a measure for filtering / grouping

$
0
0

Hi,

I have a tabular model in which i calculate a daily score for every customer in 4 parameters. After calculating the score for every parameter i calculate the AH daily score based on those scores.

is there any way to use the customer's daily score as some sort of attribute
(Score>80 - green, 30<=score<=80 - yellow, score<30 - red) according to the score and then use this attribute in order to filter or count the number of customers in every group?

Thanks!

Importing table via Custom Query Error

$
0
0

In building my tabular model, I am importing tables based on a series of select Insert Into tables.

Within the Custom SQL query window, I submit my query which creates 3 Temp tables, populates the temp tables, selects from the temp tables, then proceeds to drop the temp tables. 

The query works successfully in SSMS, however in Visual Studio, when I enter the query and click "Validate" the error message "Invalid object name 'TempTable1" appears. 

Am I doing anything improperly? How can I get select to load within my tabular model? 

Different results using ALL or ALLEXCEPT

$
0
0

Hi,

i have the following measure:

Weighted Score = 
SUMX (
    'Fact_Customer_parameter_Scores',
    Fact_Customer_parameter_Scores[Scores] * Fact_Customer_parameter_Scores[Parameter_Weight]
        / CALCULATE (
            SUM ( Fact_Customer_parameter_Scores[Parameter_Weight] ),
            ALLSELECTED ( Dim_Parameters ),
            ALLEXCEPT (
        'Fact_Customer_parameter_Scores',
        'Fact_Customer_parameter_Scores'[Customer],
        'Fact_Customer_parameter_Scores'[Date]
    )
        )
)

I tried replacing the ALLEXCEPT section with ALL in order to enable filtering on some of the attributes and for some reason i get different measure results.

Then new measure is:

Weighted Score using all =
SUMX (
    'Fact_Customer_parameter_Scores',
    Fact_Customer_parameter_Scores[Scores] * Fact_Customer_parameter_Scores[Parameter_Weight]
        / CALCULATE (
            SUM ( Fact_Customer_parameter_Scores[Parameter_Weight] ),
            ALLSELECTED ( Dim_Parameters ),
            ALL (
                'Fact_Customer_parameter_Scores'[Scores],
                'Fact_Customer_parameter_Scores'[Parameter_Weight],
                'Fact_Customer_parameter_Scores'[Parameter]
            )
        )
)

These are all the fact fields and measures:

The different results:

Any ideas

Thanks!

Viewing all 14337 articles
Browse latest View live


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