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

users never logged in and logged in as fact/s

$
0
0

Hi,

What is the correct/best approach to have measures that show count of users never logged in and logged in .IF we store the two types of data in single table,the users who have never logged in will have null in date field and others who logged on will have logon dates.But in modelling,when i have a date dim connected to this fact with logon date,there will be nulls in facts.

How can i integrate this data into my model to show a trend of the measure: user count who never logged in.I am storing the daily snapshots.

Do i need to create 2 facts: one with logon dates and one without logon dates.Then join logon date with date dim and null logon date with snapshot date.

Attached is the source of data currently.


Cannot Process SSAS Tabular Models with an SSAS-Based Data Source with Analysis Services Projects Extension v2.8.17

$
0
0

After the Analysis Services Projects extension updated to 2.8.17, my colleagues and I receive the following error when we try to add or process an SSAS model as a data source to a new or existing model with 1400 level compatibility:

Could not load file or assembly 'Microsoft.PowerBI.AdomdClient, Version=15.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. Strong name validation failed. (Exception from HRESULT: 0x8013141A)

Previously we were able to fix this by installing the latest version of SSDT but this seems to be caused by the latest version of the extension. With VS2017 we can rollback SSDT to an older version but with VS2019 there does not seem to be a way to rollback or downgrade the extension. What is the best way to fix this issue?

Downgrade SQL Server 2012 Edition (Ent to Std) with SSAS

$
0
0

We got SQL Server 2012 with SSAS running on Enterprise Edition and we need to downgrade it to Standard Edition. We need to uninstall SQL Ent and re-install Standard Edition.

I am looking for instructions around backup, restore and post-restore checks of SSAS ?


MDX Calculated measure - with dimension set

$
0
0

I'm trying to create a measure that has a set of dimension attributes

This code returns #Error saying Aggregate cant be used on calculated members on the Measures dimension.

WITH MEMBER [Measures].[EquipmentSpecificAvailability] AS  
(
AGGREGATE({[DIMEquipment].[ControlType].&[Item1] ,[DIMEquipment].[ControlType].&[Item4]}) 
,([DIMEquipment].[Class].&[ClassItem1]
, [Measures].[Availability])
)

using cross join - the function expects a string or numeric expression for the argument - a tuple set was used

  MEMBER [Measures].[EquipmentSpecificAvailability] AS 
  ([Measures].[Availability])
* {[DIMEquipment].[ControlType].&[Item1] ,[DIMEquipment].[ControlType].&[Item4]}  
* {[DIMEquipment].[Class].&[ClassItem1] }

I'm sure i'm making this harder than it needs to be but can't figure out the required syntax.

Any assistance would be appreciated.

Attribute in first level in hierarchy is not visible in cube

$
0
0

Hi,

I have added a new attribute to an existing dimension. That attribute is used in a hierarchy at level one and there is another attribute in hierarchy at level two. Source data shows the relationship between both attributes and both attributes are populated. Now when cube is processed, in the SSMS attribute in the second level shows the values as they were in the source data, but the attribute at the first level in hierarchy is not showing any thing (is BLANK). Can someone guide here and tell me which might be the reason of that?

Thanks in advance.

Best Regards,

Tahir


Thanks, TA

SSAS Tabular model processing error

$
0
0

Hello,

We have a tabular model (SQL Server 2017) with two large related tables, one with aproximately 18 million rows (unique ids) and another with around 150 million rows.

We have been succesfuly processing this model on two steps: first a "dataOnly" refresh and then an "automatic".

The first part is stilll working ok but the second part is failing and throwing the following error:

"Error -1055129594:  
An unexpected error occurred (file 'pffilehash.cpp', line 3267, function 'PFFileHashTable<class PFCSIteratorItems,class PFMemoryHashStore,0>::ExpandAux').
The current operation was cancelled because another operation in the transaction failed.
The JSON DDL request failed with the following error: Failed to execute XMLA. Error returned: 'Cannot order ''[] by [] because at least one value in [] has multiple distinct values in []. For example, you can sort [City] by [Region] because there is only one region for each city,  but you cannot sort [Region] by [City] because there are multiple cities for each region.
An unexpected error occurred (file 'pffilehash.cpp', line 3267, function 'PFFileHashTable<class PFCSIteratorItems,class PFMemoryHashStore,0>::ExpandAux').
The current operation was cancelled because another operation in the transaction failed."

The log on sql server MS shows that is correctly processing hierarchies up to a point where it stops. At this point the server memoy is around 35%, from this moment on it does not process anything else, and the memory increases over 90% until it throws the above error.

We tried to increase the memory on the server but it did not work.

Any idea what could be causing this error?

Getting number of errors while deploying the cube.

$
0
0

Hello guys,

                 Basically I am a T-SQL, SSIS guy and this is going to be my first hands on experience with SSAS CUBE. I managed to create dimensions and fact tables and created data source views and basic cube , now at a time of deployment I gave server name by simply changed it from LOCAL HOST to appropriate SERVER name. When I click deploy it gives me 22 errors, I assume that its not 22 because its related to one another so if I solve main error I can solve remaining too. I read CLASS NOT REGISTER to most of the errors! What is that and why is there and how to remove? 

Please help.

Error	3	Errors in the back-end database access module. The provider 'SQLNCLI10.1' is not registered.		0	0	
Error	4	The following system error occurred:  Class not registered 		0	0	
Error	5	Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'LIMSDM', Name of 'LIMSDM'.		0	0	
Error	6	Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dim Batches', Name of 'Dim Batches' was being processed.		0	0	
Error	7	Errors in the OLAP storage engine: An error occurred while the 'Batch ID' attribute of the 'Dim Batches' dimension from the 'Analysis Services Project3' database was being processed.		0	0	
Error	8	Internal error: The operation terminated unsuccessfully.		0	0	
Error	9	Server: The current operation was cancelled because another operation in the transaction failed.		0	0	
Error	10	Errors in the back-end database access module. The provider 'SQLNCLI10.1' is not registered.		0	0	
Error	11	The following system error occurred:  Class not registered 		0	0	
Error	12	Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'LIMSDM', Name of 'LIMSDM'.		0	0	
Error	13	Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dim Bulk Material No', Name of 'Dim Bulk Material No' was being processed.		0	0	
Error	14	Errors in the OLAP storage engine: An error occurred while the 'BMID' attribute of the 'Dim Bulk Material No' dimension from the 'Analysis Services Project3' database was being processed.		0	0	
Error	15	Errors in the back-end database access module. The provider 'SQLNCLI10.1' is not registered.		0	0	
Error	16	The following system error occurred:  Class not registered 		0	0	
Error	17	Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'LIMSDM', Name of 'LIMSDM'.		0	0	
Error	18	Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dim Production Date', Name of 'Dim Production Date' was being processed.		0	0	
Error	19	Errors in the OLAP storage engine: An error occurred while the 'Prod Date ID' attribute of the 'Dim Production Date' dimension from the 'Analysis Services Project3' database was being processed.		0	0	
Error	20	Errors in the back-end database access module. The provider 'SQLNCLI10.1' is not registered.		0	0	
Error	21	The following system error occurred:  Class not registered 		0	0	
Error	22	Errors in the high-level relational engine. A connection could not be made to the data source with the DataSourceID of 'LIMSDM', Name of 'LIMSDM'.		0	0	
Error	23	Errors in the OLAP storage engine: An error occurred while the dimension, with the ID of 'Dim Analyte', Name of 'Dim Analyte' was being processed.		0	0	
Error	24	Errors in the OLAP storage engine: An error occurred while the 'Analyte ID' attribute of the 'Dim Analyte' dimension from the 'Analysis Services Project3' database was being processed.		0	0	


ANK HIT

How to build a measure in an MDX query with calculations depending on date ranges?

$
0
0

I'm having difficulties building a measure that would perform calculations based on differend date ranges. Basically, I want it to perform one calculation for the date dimension before a certain date and a different one for the date dimension after that date.

I've got it working when the date hierarchy in question (day) is on the row axis, but as soon as I replace it with the month hierarchy, the calculation doesm't aggregate correctly.

Here's the query I'm working with:

with member [Measures].[Profit] as
  iif (
    [Date].[Date].currentmember is [Date].[Date].[Day].&[20170115],
    [Measures].[Sales]-[Measures].[CostA],
    [Measures].[Sales]-[Measures].[CostB]
  )
select
  [Measures].[Profit] on columns,
  [Date].[Date].[Day] on rows
from
  [SalesCube]

And this one fails to calculate the profit correctly:

with member [Measures].[Profit] as
  iif (
    [Date].[Date].currentmember is [Date].[Date].[Day].&[20170101],
    [Measures].[Sales]-[Measures].[CostA],
    [Measures].[Sales]-[Measures].[CostB]
  )
select
  [Measures].[Profit] on columns,
  [Date].[Date].[Month] on rows
from
  [SalesCube]



measure to calculate users who logged in from daily snapshot data

$
0
0

Hi,

I have a model with Date dim and fact table containing username,last_login,application columns.Fulldate is related to last_login.Last_login is the max(logindate) for each user per row in fact table per day.My measure should calculate count users who "didnt login" in last 7 days.I tried below to get the count to get users who used and count is correct but when i drag last_login in the visual along with this measure,it shows me all dates the user logged in last 7 days.

Pls help.The attachment has 2 images:

Expected one gives me correct number and visual gives me correct data because the calculated table i have does below:

Table =
SUMMARIZE (
Test_AppsUsage_F,
Test_AppsUsage_F[Username],
Test_AppsUsage_F[Subsystem],
"Max_logon", LASTDATE ( Test_AppsUsage_F[Last_accessed] )

)

Used(Measure)=calculate(DISTINCTCOUNT('Table'[Username]),'Table'[Max_logon]>today()-7)

Notused=DISTINCTCOUNT('Table'[Username])-[Measure]

I tried the same logic in a measure within the fact table because i shouldnt be using a calculated table for this.

The measure Used_NEW gives me correct Total count but the visual brings in additional rows for all last_accessed dates per user.How do i fix this:

#Used_NEW =
CALCULATE(DISTINCTCOUNT(Test_AppsUsage_F[Username]),
FILTER (
SUMMARIZE (
Test_AppsUsage_F,
Test_AppsUsage_F[Username],
Test_AppsUsage_F[Subsystem],
"Max_logon", LASTDATE ( Test_AppsUsage_F[Last_accessed] )
),
LASTDATE ( Test_AppsUsage_F[Last_accessed] )
> TODAY () - 7
)

)

This #NotUsed_NEW gives me wrong count altogther: #NotUsed_NEW=[#TotalUsers]-[#Used]

Pls fix the 2 measures.

I have attached the image of the expected(left) which comes from calculated table and output

from fact on right side.

OLAP Performance versus AWS Redshift

Inactive running count day over day

$
0
0

Hi,

I would like to have cumulative count of users who are inactive each day  or end of each week or end of month.I tried the below but it doesnt give me the output and query times out.Pls help.Attached is the sample data and expected output.

Note: Last_accessed is related to Date (active). Snaphotdate and Date are related asinactive.

My meaure:

CALCULATE (

COUNTROWS( Dim ),Dim[Activity]="Inactive",USERELATIONSHIP ( Date[Date], Dim[SnapshotDate] ),FILTER(allselected(Date),Date[Date]<max(Dim[Last_used])))

This measure correct running counts by Day as you see below:

The issue is i am not able to see users data when i bring in username,system column into column chart.,can you please point out how to fix this.:

I want see the output in my visual like one highlighted :

FIX: Data processing is much slower in SSAS 2016 SP2 and 2017 than in SSAS 2016 SP1

SSAS In Memory Consumed through Power BI

$
0
0

Hello ,

I have created an In-memory model built on SSAS Tabular .

When i am trying to consume the model using Power BI (live connection) , i am getting error using slicer .

I am dropping a dim column as slicer and trying to slice the fact, i get an unexpected exception error .

I am using 2017 SSDT . This is working as expected when i import to Power BI or power BI using direct query .I am not sure if i miss a update for SSDT, below is my config for now icrosoft SQL Server Management Studio14.0.17289.0

Microsoft Analysis Services Client Tools 14.0.1016.283
Microsoft Data Access Components (MDAC)10.0.14393.0
Microsoft MSXML3.0 6.0 
Microsoft Internet Explorer9.11.14393.0
Microsoft .NET Framework4.0.30319.42000
Operating System6.3.14393

The error message is 

"Cannot load image for the visual .

An unexpected error occurred "



SSAS Tabular dynamic partition

$
0
0

I need a good article to dynamically create partitions in SSAS tabular model via SSIS package.

It should also check if partition exist then don't do anything else create new and delete old partitions.

Thank you for the help


Modelling of snapshot tables for Tabular 2017 with M2M relationships

$
0
0

Hello everybody,

I'm looking for a solution of a data modelling problem in SSAS Tabular 2017.

My tabular project is loaded from a SQL Server Database. The tables in the database are modelled as snapshots.

From a business point of view we're documenting possible cases that can lead to some damage for the business (power blackout, hardware failure, theft etc.) and what counteractions were taken to prevent these cases / decrease their damage. The users enter (and delete) such events and counteractions once per month. So for each month we have a snapshot of possible damage cases and counteractions.

In the SQL database I have following tables:

1. Date (DateId int). One record for each month.

2. DamageCase (DateId int, DamageCaseId int, other columns). PK is (DateId, DamageCaseId).

3. Counteraction (DateId int, CounteractionId int, other columns). PK is (DateId, CounteractionId).

4. MapDamageCaseToCounteraction(DateId int, DamageCaseId int, CounteractionId int). It's a many-to-many table, so one damage case can have multiple counteractions. And one such action can counter several damage cases. It's also a snapshot for each month.

In my tabular project I've defined following relationships:

1. OneDirection DamageCase->Date over DateId

2. BothDirections(!) DamageCase<->MapDamageCaseToCounteraction over (DateId, DamageCaseId). I had to make a single technical column from these two, because the relationships can only use one column, but it's not important here.

3. OneDirection MapDamageCaseToCounteraction -> Counteraction over (DateId, CounteractionId).

With this model I can build following pivots using Excel as frontend:

1. DamageCases for a given Date

2. Historical development of a damage case (such as its estimated probability)

3. Overview of DamageCases with corresponding Counteractions

4. Overview of Counteractions which are registered for one or more DamageEvents.

What I cannot do is to make an overview of all Counteractions which are valid for a given date. Independent of the filter on the Date I always see all possible Counteractions, also the historical ones.

The only connection between Counteraction and Date tables goes over MapDamageCaseToCounteraction. I cannot add a relationship between Counteraction and Date because of "There are ambiguous paths between MapDamageCaseToCounteraction and Date".

I have found a hack/workaround: Make a Relationship and set it to inactive. Make a "dummy" measure in the table Counteraction (such as Count()) and use the function USERELATIONSHIP to apply the inactive relationship between Counteraction and Date.

Is there a better solution for this problem?

Thanks in advance.


The data source view does not contain a definition for the 'dbo_view_myview' table or view.

$
0
0

Using SSAS on SQL2014 standard edition.

I am trying to create a query binding partition on one of my measure groups by selecting a subset of data ( example query:Select <column list> from FROM [dbo].[View_MyView] WHERE [View_Myview].[timeid] >= 20170701) There is only one query, so no data overlapping between partitions.

The view shows up in the DSVand I also did explore data. Why ami i getting this error when I deploy and process this partition.

"Errors in the high-level relational engine. The data source view does not contain a definition for the 'dbo_view_myview' table or view. The Source property may not have been set"

It processes fine if I use table binding.

Another thing I noticed is that when I set the partition with query binding, I do not see DSV as data source. It only has the relational ds option, while when I set up table binding partition it shows both relation and dsv data sources and the table binding partition works with dsv, not relational ds.  Is there a way to setup query binding partition with dsv?

Thanks in advance.


Schedule job to automatic process SSAS cube

$
0
0

Hi,

I want to Schedule job to process SSAS Cube after ETL process. For ETL process we are using Windows Scheduler task. So after getting Status Success of ETL, Cube will process on scheduled time.  Please suggest the proper steps.

Thanks in advance,

Manisha


Manisha Chauhan

Need to create a 3mo Average as a Calculated Member (Measure) in SSAS Multidimensional

$
0
0

Hi, 

   I have researched many forums and still cannot make my 3mo average to work. Im using Visual Studio to create a new Calculated Member calle "3mo AVG". I have a Fiscal Time Hierarchy: Dimension Name = "Fiscal Time", Hierarchy Name = "FISCAL TIME HIERARCHY" and my Months level is called "FISCAL MONTH (Label Only)".  I need the Average to always be calculated at the month level.


My MDX looks like this:

AVG( { [FISCAL TIME].[FISCAL TIME HIERARCHY].[FISCAL MONTH (Label Only)].CURRENTMEMBER.LAG(2) :

[FISCAL TIME].[FISCAL TIME HIERARCHY].[FISCAL MONTH (Label Only)].CURRENTMEMBER } ,

[Measures].[AMOUNT or UNIT - WARRANTY] )

It is not working, I dont know what I'm I doing wrong. 


Processing Tabular Cube.

$
0
0

When i am processing a database on Analysis server , i am getting the following error . i had investigated a lot about this but didn't found a helpful article regarding this.

The Error i am getting is 

This command cannot be executed on database 'ABC' because it has been defined with StorageEngineUsed set to TabularMetadata. For databases in this mode, you must use Tabular APIs to administer the database.

Organizing measures in a separate table in SSAS tabular cube

$
0
0

Hello

I have lots of calculated measures scattered across two tables and want to organize them. How can I create a "dummy" calculated table so that all measures can be transferred to the new table.

Regards

Priyadarshi


Viewing all 14337 articles
Browse latest View live