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

Calculated Member as dimension in MDX query

$
0
0

I have a dataset that I need to pull by running an MDX query. I keep getting Out of Memory exceptions each time I include a couple of dimensions. For example, if we take a dimension called Product which I am pulling in the query, I only care if the Product = "Phone". This dimension has multiple levels like tablet, PC, Mac, Watch etc.

So I am planning to check if the Product is "Phone" and if it is I need to mark it as "Phone" and if not, I will mark it as "Other". In short, I am converting a multi level dimension to just a two level one.

So far I have tried using calculated measure using WITH but it says that I will have to pull the dimension on the axis for me to be able to use it in the calculated measure area. Is there any way I can reduce the number of rows while maintaining the grain that I want?


AVG X years for specific month in MDX calculation

$
0
0

Hi!

I am very new to OLAP and MDX, so please bear with me if the problem is simple.


I have created a cube with two different fact views so the measures are kept in a actual and a budget folder in the cube.

Now I want to make a calculation which gives me rolling X years in specific month month  , so if the user is standing in Year=2018 and Month = August then

i have to get Avg Sale in 

Year=2015 and month =August ,

Year=2016 and month =August

Year=2017 and month =August

Than sum AVG sale result from above.

My question is: how should the function look like?

Thank you very much.

Multidimensional Personalization Extensions are Unreasonably Slow

$
0
0

It has been some time since we first started using personalization extensions for analysis services.

See: Personalization Extensions

They are quite powerful, and the users who have discovered them are now building more and more custom members, for their ad-hoc reporting purposes.  The primary types of items that users want are personalized sets, and calculated members.  These are introduced into the cubes during the "CubeOpened" event by calling "CREATE SET" and "CREATE MEMBER".

The problem we are experiencing nowadays is that users are taking this feature further than what I had expected.  They are using them to create hundreds of ad-hoc custom sets and members.  When these users connect to the cubes in their Excel workbooks, it can take 30-60 seconds for the SET's and MEMBER's to get created.  This means they have to wait a long time before they can even start making queries against their pivot tables.

Moreover, there doesn't seem to be a way to create more than one at a time.   They have to be requested individually , via AdomdCommand ( Link ).  I've found that as you keep calling CREATE MEMBER, the operations get increasingly slower (ranging from 1 ms each at the beginning to about 30 ms each after 500 members have already been created).

Can anyone tell me if they've used personalization extension to this extent, or encountered this scalability problem when using lots of SET's and MEMBER's?  I'd really like to be able to create a large number of custom calculations (via CREATE MEMBER) without getting bogged down.  As near as I can tell, the programming interface doesn't allow the bulk creation of multiple members, nor does it allow a personalized calculation script.  Any pointers would be greatly appreciated.


David Beavon


Why i have problems with a filter by 0?

$
0
0

Hi guys, probably i'll have to put msdn as my start web, lately i'm not on another site, anyway.

I'm having problems with a filter by 0, what i do is this:

Filter([Objetivos].[Id Objetivo].[Id Objetivo],  [Measures].[Valor Pagado] = 0).count

And what returns is all the objectives ignoring the filter, but when there is an objective different of 0 it is not counted.

If i change the value 0 for another value it works good, i don't know if maybe it comes because the column is type Numeric and is looking the decimals, but i'm not sure about that because i tried a ROUND({},0) and stills the same.

Here an example, right values filtered by [Measure].[Paid Value] > 500, middle filtered by [Measure].[Paid Value] = 0, left years.

I have to say that in the total of count by 0 or any number works good, but when i filter by date no.

Left [Measure].[Paid Value] = 0, right [Measure].[Paid Value] > 500

SSAS cube Calculation for time to date

$
0
0

Hi Folks, 

We have a measure Called NumberOfOrders we need to calculate the measure on date.  Which is the Calculated measure 

I have used the below Expression, but In Excel Pivot Report if I applied the filters which measure isn't working. 

Any ideas please!

Expression:

IIF ( NOT ([Date].[Fiscal Year - Month].CurrentMember IS [Date].[Fiscal Year - Month].DefaultMember),
SUM(NULL:[Date].[Fiscal Year - Month].CurrentMember, ([Measures].[NumberOfOrders])),
IIF (NOT( [Date].[Calendar Year - Month].CurrentMember IS [Date].[Calendar Year - Month].DefaultMember),
SUM(NULL:[Date].[Calendar Year - Month].CurrentMember, ([Measures].[NumberOfOrders])),
IIF(NOT([Date].[Fiscal Year - Week].CurrentMember IS [Date].[Fiscal Year - Week].DefaultMember),
SUM(NULL:[Date].[Fiscal Year - Week].CurrentMember, ([Measures].[NumberOfOrders])),
IIF(NOT([Date].[Fiscal Calendar].CurrentMember IS [Date].[Fiscal Calendar].DefaultMember),
SUM(NULL:[Date].[Fiscal Calendar].CurrentMember, ([Measures].[NumberOfOrders])),
SUM(NULL:[Date].[Calendar Date].CurrentMember, ([Measures].[NumberOfOrders]))
)
)
)
)

Change Type to percentage is not working in table properties

$
0
0

I have a column in table where values are integers.

I want to convert that column to percentages i.e., if 0 then 0%, 0.5 then 50%, 0.66 then 66%, 1.3 then 130% etc ...

So, changed the type of that field to Percentage in the table properties. Values are displaying in percentages in query table properties editor but still values are not displaying in percentages.




Implementation SSAS Tabular Custom Rollup for multiple tables

$
0
0

Is it possible to implement custom rollup behavious in SSAS tabular for multiple dim tables?

I understand it is achievable by DAX if custom roll up is to happen across one dimension.

However, in enterprise model we have multiple dimension tables in which a custom roll up might be required.

Hence is it possible in Tabular modelling or in such cases we should move to multidimensional cubes ?

recent record to be used twice

$
0
0

Hi,

i have 4 types of records for one customer in my fact table.

i need to find out the latest type of record and say that this is current one.

Here is the issue now,

suppose i have 4 rows with four types and i found the latest one and call it current.

it makes my record count 5 twice for the latest one which doubles up the value for current one.

Is there a way to find a solution to this kind or this cannot be done in analysis services?

Here 4 is the latest which will double up the value to 280000.




Error: "Exceeded the maximum number of partitions in a measure group" when creating offline cube

$
0
0

Hi all

Running SQL Server 2012 Developer Edition in multidimensional mode. I created a very simple cube with a measure group with 4 partitions.

The cube processes and deploys fine.

I wrote a little c# app that does 2 things: connect to the cube using AMO and generates a create cube XML command. Then using ADOMD, execute this against an offline server (local file).

When executing the ADOMD command, I get the following error:

"Errors related to feature availability and configuration: Exceeded the maximum number of partitions in a measure group. The installed server edition allows not more than 3 partitions and not more than 1 writeback partition."

If I delete one partition to get down to 3 partitions, the xmla executes fine and an offline file is created successfully.

Is there such a restriction for offline cubes?

Thanks!

Cube with multiple Datasourceviews

$
0
0

Hi

I got a doubt , can we create cube which uses multiple data source views?

I know how to create a data source view by using multiple data sources, but is it possible to create single cube which will use multiple data source views

Thanks

Can see the data in the partition query. After processing, not available in cube.

$
0
0

Hi all

Stumped on this. Data is in data mart, cube processed (full), no errors, all data for measure group not available in cube for specific partition. All other partitions its ok for the measure group. The partition filter is fine for other measure groups. Tried recreating partition, reprocessing cube etc. Always data is empty for that partition on that measure group. Compared the partitions, all same except for the partition parameter.

If I take the query from the cube process window for that partition / measure group, and add the predicates for the data that I am expecting to see in the cube, it's there in the data mart.

Everything is there, except that the data doesn't get inserted into the cube.

Does anyone have any suggestions? Not sure what else to try....

Thanks in advance.

When a SSAS Database Dimension can be Shared across multiple cube? and when CANNOT?

$
0
0

Hello All,

Till Toady, I knew that a Database Dimension can be shared across Multiple cubes in Same SSAS Database But this is notalways true. I tried below and found followings: 

I tried creating a cube using more than 1 DSV and It is not allowed. So Cube can have Measures only from 1 DSV.

I can create a Dimension under Dimensions from more than 1 Data Source View.

Scenario 1: Have only one Data Source

I have one Data Source: DS-1 and 2 Data Source View

  1. DSV-1 (Data Source: DS-1 (primary))
  2. DSV-2 (Data Source: DS-1 (primary))

Note: Data Source View can have tables/View/Named Query from multiple Data Sources but each Data Source View has one Primary Data Source

Now, I created a Database Dimension-1 which is using DSV-1 and Database Dimension-2 which is using DSV-2

Created a cube called Cube-1 using DSV-1 and then I tried to add Dimension-2 ( which is coming from DSV-2) in Cube-1 and It isALLOWED.

Conclusion: If you have Multiple Data Source Views and all Data Source Views have same (primary) Data Source: DS-1 (primary), Then Database dimensions can be shared across multiple cubes, no matter from which Data Source View Dimension is coming

Scenario 2: Have more than one Data Source

I have 2 Data Sources: DS-1 & DS-2

Also have 2 Data Source Views:

  1. DSV-1 (Data Source: DS-1 (primary))
  2. DSV-2 (Data Source:DS-2 (primary))

Note: Data Source View can have tables/View/Named Query from multiple Data Sources but each Data Source View has one Primary Data Source

Now, I created a Database Dimension-1 which is using DSV-1 and Database Dimension-2 which is using DSV-2

Created a cube called Cube-1 using DSV-1 and then I tried to add Dimension-2 ( which is coming from DSV-2) in Cube-1 and It isNOT ALLOWED.

Conclusion: Database dimensions cannot be shared across multiple cubes, If they are coming from 2 different Data Source Views who have 2 different Primary Data Sources.

Please correct me If I am wrong. 


Thanks Shiven:) If Answer is Helpful, Please Vote


YTD returns NULL

$
0
0

Hi guys, i'm a newby with MDX, ssas, and this world, probably you see the problem fast but i can't find it. 

I have a Dimension [Date Pays]

This dimension has year, year month, month, semester, trimester. 

All with his attributes of Time and Dimension too.

So i'm trying to do YTD function but i can't put to work.

With Member [Measures].[YTD] as 
'AGGREGATE(YTD([Date Pays].[Year]),[Measures].[Paid Value])'

SELECT {[Measures].[Paid Value], [Measures].[YTD]} ON 0,
[Paid Value].[Year Month].Members ON 1
FROM [RH]

This returns null, and if i put YTD without Date Pays it returns the typically error that level year was expected, but i have the Level [Year] as Years attribute, so i don't know what i'm doing wrong, if you can help me guys i really appreciate thanks.

Incorrect total for last year sales measure

$
0
0

Hello,

I created the following measure on the adventure works database to get the last year sales:

CREATE MEMBER CURRENTCUBE.[Measures].[Last Year Sales]
 AS SUM(existing [Date].[Calendar].[Date].members, (PARALLELPERIOD([Date].[Calendar].[Calendar Year]), [Measures].[Internet Order Quantity]))

If add this to a pivot table with Data on columns and slicer on January and February the totals are incorrect. See screenshot below. Is there a way to change the measure formula above to get the correct total. 

Thanks,



Calculated Member based on dimension attribute value

$
0
0
I have a report that is using a ssas multidimensional cube as data source (live connection)

I have two amount measures (local_amount and euro_amount)


I have created role dimension metric attribute (Index,MetricName)

Metric

Index  MetricNAme
1IMT
2       UST

I want to create calculate measure in SSAS , when i select MetricName="IMT" then local_amount  measure should select else euro amount would select.

Please help me on this task



Errors in the ole db provider: an error occurred while loading the connection dialog box component for prompting

$
0
0

Hello All,

Recently One of the User facing below issue with the Cube Report but earlier the same report which was working fine and refreshing successfully. Excel Report has been connected to the SSAS cube through Analysis services connection.

An Error was encountered in the transport layer, once he clicks on 'OK'he is getting below error 

Errors in the ole db provider: an error occurred while loading the connection dialog box component for prompting

I seen few links which does the fix - Uninstalling Microsoft Office 2010 Service Pack 2 and then re-installing the drivers fixes the problem.

kindly please confirm,  is it because of MS Office drivers ? if no, please help to fix the issue.

DATEDIFF not working in a MDX query..

$
0
0

Hi All,

Thanks, in advance to help me out for a MDX query issue.

I want date part from a date dimension, to get that I tried below MDX but it's not giving result.

For Month :

member [StartDate_DateDiff_InMonth] as DATEDIFF("m",[Dimension].[StartDate].currentmember.MemberValue,now())

For year :

 StrToMember("[Dimension].[StartDate].&[("+ Format(now(), 'yyyy')+ ")]";

 

SSAS ParallelPeriod Function in Excel

$
0
0
Does anyone know where I can find a tutorial on working with ParallelPeriods in SSAS? I need it to work in Excel? If anyone could even show me the basic syntax, I'd appreciate it as well.  My date dimension is called SalesDate, which has a hierarchy called DateofSales. Thanks.

Why the aggragate number is diffrent then the one below? - Image included

Getting "Not Supported in DirectQuery 1400 Mode" Error with OAuth2 Authentication

$
0
0
I am running Visual Studio 2017 15.8.7 and attempting to connect to an Azure SQL database (PaaS) with AAD authentication from an Azure Analysis Services (AAS) model in DirectQuery mode.

I am getting the following error: "Failed to save modifications to the server. Error returned: 'Datasource 'SQL/myservername database windows net;mydatabasename-' has authentication kind OAuth2. This is not supported in DirectQuery 1400 mode.'"

Please advise. Thanks!


Viewing all 14337 articles
Browse latest View live


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