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

Lagging a STRTOMEMBER

$
0
0

I am trying to use a lag on STRTOMEMBER function, but when I do it the query only gives measure and not client name, client nr etc. This is the code I am trying to use: 

SELECT { [Measures].[Loss Ratio] } ON COLUMNS, { ([Cost Center T1].[Client Name].[Client Name].ALLMEMBERS * [Cost Center T1].[Client Number].[Client Number].ALLMEMBERS * [Date].[Months].[Label Month].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS 
FROM ( SELECT ( STRTOMEMBER(@DateMonths, CONSTRAINED) ) ON COLUMNS 
--FROM ( SELECT ( STRTOMEMBER@CostCenterTClientName, CONSTRAINED) ) ON COLUMNS 
FROM [IncidentInsurancePerspective]) 
CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAG

Does anyone have experience with anything similar?


Add calculated member Error

$
0
0

Hi,

I had trying to add a Calculated member that contains a count of specific product see the code as bellow

When i process the cube i don't have an error but when i go the Browser to see the value of my new measure a get the value as bellow :

Please can someone explain me what's the problem in my Calculated measure ?

Also i want to add a new Calculated member that with the query as bellow :

select {[Date].[CY 2005], [Date].[CY 2006] , [Date].[CY 2007]} on rows,
[Measures].[Internet Sales Amount] on columns from
[Adventure Works];

I want to know how can i do that with ssas.

Thanks

Help with Error: The datasource, 'Adventureworks2014, contains an ImpersonationMode that is not supported for processing operations.

$
0
0

Would appreciate some help getting past this silly impersonation error which is preventing me from processing the adventure works tabular cube. As you can see from the screenshots, I have the PC/MAIN user setup as an admin on both SQL server, and SSAS.

Using DAX to get prespective name

$
0
0

Hello,

Is there a way to use DAX to get the name of the prespective to which the user connected?

I would like to use it in a DAX exppression, so that if you connected to prespective A you get different results then using prespective B.

Thanks in advanced,

Chen


Thanks, Chen Hirsh

How to QA dynamic user permissions of cube

$
0
0

Hi,

Our Deals cube has dynamic user permissions set from role using custom data on certain dimensions.

When changing dynamic user permission definitions, how can I QA/ debug the results which can be seen by each user?

Ex: if user domain\XX should only be able to see certain records out of all records, how can I make sure the code behaves correctly? If I deploy the SSAS project to a DEV DB and make performance point dashboard based on the DEV DB, still I cannot QA the dashboard as if I was user domain\XX (since I don't know his password). So how can I check the code's correct before deploying to production?

Thanks


Namnami

Dimensional modeling

$
0
0

I'm building an SSAS Tabular Cube and have a modeling questions (my example here is simplified).

Let's say I have dimensional data for Region and Warehouse, where one region can contain several warehouses. Then I have 2 fact tables with different grain; Sales facts is on Region-level and Inventory facts are on Warehouse-level. Now I can see 2 different ways of building the data-model (see image):

A. Region and Warehouse are put in 2 different tables and a relationship between them defines their 1-n hierarchy. Each table then has a relationship to their facts.

B. Region and Warehouse are put in the same table (called Location). This table has some rows on Region-level (where Warehouse column is empty) and some rows on Warehouse-level. This enables the different fact tables to relate the same key.

 

I see that there are some pros/cons with each approach, but can't decide on which is better.

Pros with A:

  • Easier to develop and maintain.
  • If relationship between Sales and Region is made bidirectional then Sales facts can filter out warehouses.

Pros with B:

  • Faster performance because less relationships and keys?
  • All location-relevant dimensions in the same table.
  • Fewer tables to maintain.

 

What approach would you say is better and why?

Design question, many to many

$
0
0

Conceptually I have a Document. Document is owned by Customer. Document can be sent out through different Channels. Example of channel could be "post" or "email". 

We want to count:

a) number unique customers who have documents sent over post. Please note that a document here can first be sent over email, then per post. If so it should be counted.

b) number unique customers who have documents sent _only_ over post. This means we should exclude documents which have been sent over another channel than post. E.g. if it was sent first over email, then later over post, then we should not include it in our count.

The naive solution would be to create Fact_Document and Dim_Channel, but this would not be correct because a Document can be sent over one or more channels. In other words, we are dealing with a many to many relationship between  Document and Channel. Ergo, we create Fact_Document, Bridge_DocumentChannel along withDim_Channel. But this solution is not entirely correct because we need to distinguish between case a) and b). How can this be done?

I've consider to add some kind of Filter dimension. Such a filter dimension could have members such as "All", "Only per post", "only per email". If so I need to degenerate the Bridge_DocumentChannel to also contain this filter dimension,but I'm not sure if that's the way to go.

Any input would be deeply appreciated.

Using EXCEPT in Calculated member

$
0
0

Hi,

I have been searched in the net how can i use EXCEPT in Calculated member but i didn't found any result

What i am trying to do is creating a new Calculated member that contains a count of specific sub-category but EXCEPT some

sub-category what i am doing is like :

select count(*) from table where subcategory not in(....) 

I tried a solution but it doesn't work for me :

Thanks for help


MDX: How to Select Different Levels in Same Dimension?

$
0
0
 this query works no problem:
 
SELECT {[Calendar]} ON COLUMNS,    
{[APN].[Audio], [APN].[Battery]} ON ROWS    
FROM [COMP] 
 
But this one gives syntax error.
As you can see, i'm trying to include members at different depths in the same dimension.
 
SELECT {[Calendar]} ON COLUMNS, 
{[APN].[Audio].[Cell], [APN].[Battery]} ON ROWS 
FROM [COMP] 
 
How can i select different levels of the same dimension?
 
Below, I attempted to include the "Audio" parent member, but still error:
 
SELECT {[Calendar]} ON COLUMNS,    
{[APN].[Audio], [APN].[Audio].[Cell], [APN].[Battery]} ON ROWS    
FROM [COMP] 
 
thx

MDX Aggregation

$
0
0

Dear All,

In my current cube setup, I have weekly forecast(done for entire month) and actuals at day level. Below is the sample data if I browse the cube. I would like to retrieve same results as below with actuals rolling up to month(last column)  

Forecast month and week value are from two separate date dimensions. 

Would it be possible to achieve this in mdx calculated member?

Forecast MonthForecast/Actuals WeekForecastActualsExpectedActuals
CY2016P0110  
CY2016P0120-1180 
CY2016P0130 -1180
CY2016P02450000  
CY2016P02550000  
CY2016P02650000340 
CY2016P027500000 
CY2016P028500001933819678
CY2016P039125000  
CY2016P0310140000  
CY2016P0311140000  
CY2016P0312140000500 
CY2016P0313 151434.5151934

Thank you in advance.

Regards,

Adil




Adil

DAX to get row -1 value

$
0
0

I need to calculate a rate based on a parameter from this year (NR_STUDENTS_DROPOUT) and cross reference with a parameter from the previous year (NR_ENROLLED_STUDENTS).
So far, my DAX formula looks like this and only gather information from this year. The issue is on the line highlighted in bold. I have tried to use the EARLIER function without success:

EVALUATE
(
ADDCOLUMNS(
ADDCOLUMNS(
SUMMARIZE
        (
CALCULATETABLE
            (
                'School Dropout',
                Version[ID_TB_DIM_VERSION] =1,
                'School Year'[ID_TB_DIM_SCHOOL_YEAR] <=29,
                'School Year'[ID_TB_DIM_SCHOOL_YEAR] >29 - 5
            ),
            'SCHOOL_YEAR'[SCHOOL_YEAR],
            DEGREE[DEGREE],
"NR_STUDENTS_DROPOUT", [NR_DROPOUT]
        ),
"NR_ENROLLED_STUDENTS", Enrollment[NR_ENROLLED] -- should be from previous year: 'School Year'[ID_TB_DIM_SCHOOL_YEAR] -1
    ),
"RATE", IF(ISBLANK([NR_STUDENTS_DROPOUT]), BLANK(),[NR_STUDENTS_DROPOUT] / [NR_ENROLLED_STUDENTS])
    )
)

Any help would be appreciated.
Thank you!

                                                    

SSAS 2016 Tabular Process Recalculate Issue

$
0
0

I have created Partitions within tabular model and deployed on server and processed partitions from management studio. I ran into following error when I tried Process recalculate on model from GUI & also using  script.

{
  "refresh": {
    "type": "calculate",
    "objects": [
      {
        "database": "Model"
      }
    ]
  }
}

Can someone please advise on how to recalculate model

Started processing hierarchy 'SALES' hierarchy of table 'Metrics'.
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 
Error 0: 

The JSON DDL request failed with the following error: Failed to execute XMLA. Error returned: 'An unexpected exception occurred.
The current operation was cancelled because another operation in the transaction failed.
'..
Run complete

the sort order specified for distinct count records is incorrect SSAS cube processing

$
0
0

Hi All,

 today our cube job failed with a weird error. this error we got when we processed the cube manually .

error:the sort order specified for distinct count records is incorrect.we were unable to understand what it means .

after googling a lot .

we found the a distinct measuregroup was created on a varchar column which contained negative values  can have this kind of issue . then one of the developers converted the whole dsv query column to NVARCHAR and it worked .

i wanted to know why it failed in the first place .

we checked the data also there is nothing in the column which cannot be accomodated in the varchar i mean no unicodes  or any special characters in the column . but still NVARCHAR worked .

i saw some solutions also recommended checksum/ hashbytes.

can somebody please explain what is the issue here .

 i also saw one solution recommending a server level setting change which includes

changing OLAP \ Process \ CheckDistinctRecordSortOrder to 0 .

 i searched msdn for this  and over there it is mentioned that turning off this setting can improve the distinct count performance .

please let me know what was the issue with the cube and also let me know if it is recommended to switch off this setting for performance gains on the distinct count measure group .

all help is deeply appreciated.


Aggregation of calculated measure

$
0
0

I am having following issue in one of my SSAS solutions:

I created a simple calculated measure in my cube which multiplies my amount with an exchange rate. The way the calculated member behaves currently is that it applies the calculation to subtotals and totals. Is there anyway to set it up so that it will apply the calculation to the bottom-level members and then aggregates those up into totals?

I've tried to illustrate my issue with random numbers below:

                   Amount                    Exchange Rate                    Calculation (Amount * Exchange Rate)

                   2                               1                                        2

                   3                               2                                        6

    Total        5                               3                                        15

In the table above, "Amount" and "Exchange Rate" are summed up separately and then multiplied. I'd rather have Calculation aggregate separately, as well, so that its Total will say "8".

Does anyone have an idea for that?

Many thanks

How to add a NuGet package to an Analysis Services project in Visual Studio 2015?

$
0
0

Hallo,

we have an Analysis Services Multidimensional and Data Mining Project ("Cube Project") to which we want to add an assembly.

We are using NuGet to package our internal DLLs, so we can use a Build Agent to automate the process of building, versioning and copying them to a central place (network share).

This seems to work fine for most of the projects, but not for cube projects. The "Manage NuGet packages" menu entry in the project's context-menu is just greyed out and also the project name cannot be found by the NuGet Packager Console ("Get-Package -ProjectName MyCubeProject")

So, what is the best way to add assemblies to our cube projects without having to manually maintain DLLs? Is there a reason for cube projects not supporting NuGet?

Kind regards,
Hendrik


Copy Dimensional Data to different SSAS tabular Cubes.

$
0
0

Hi,

I have a scenario where , we are using 10 (one fact and 9 dimensions) tables to model a SSAS tabular cube.

We are creating 6 different cubes of these 10 tables. 8 of the dimensions are same across all cubes except one wherein we are pulling only the required columns ( customize the columns as per requirement). We have created some perspective based on countries for all cubes.

Is there a way, wherein I can process the fact tables and 8 dimensions tables ONCE and copy it across other cubes? So that I can avoid the processing it again and save the time . 

Excel Pivot Tables: Default to Tabular

$
0
0

Very rarely do users want the "outline form" view of pivot tables, which is the default in excel 2007.  Is there any kind of setting either in excel, SSAS, or at the pivot table level to change the default to "tabular form"?  It is really annoying having to change it for every field, and even then you have to actually change it on the field BEFORE the one in question.  It's not that I personally have trouble with this, I'm a developer and used to 10 clicks to do something simple that probaby shouldn't require my input.  I am trying to push some reporting onto the end users via this pivot table functionality, and they struggle with this.  If I can't find a way around this, I forsee having to request a voicemail message with "Press 1 if your pivot table looks funny".

Thanks!

Ken

SSAS Security : Avoid Proliferation of AD Groups & SSAS Roles

$
0
0

Hi, I am currently investigating a requirement from my client to implement fine grained SSAS security roles, as I have 10 cubes which are currently bound to global Active Directory Groups.

For example, current AD groups are

BI_Sales, BI_Orders, BI_Inventory (and so on). These are bound to SSAS cubes (Sales, Orders, Inventory), with each group holding data at the global level (across around 10 countries).

I now need to implement security by country and business vertical, and I have dimensions set up for these, and am coding a Users dimension also.

However, I am concerned with the sustainability of the security model, as we currently have 10 countries and 7 verticals. If this grows, then there will be a sharp increase in the number of AD groups. I am concerned that the sheer number of AD groups that an individual user could be allocated to, will potentially slow down user access to the network, or at best provide a headache for the DBA who would need to support the security model in future.

I am looking for any ideas that can improve the flexibility and sustainability of the model, if any one has experienced this type of architecture please let me know !

Thanks in advance, David

Sub Total giving wrong result

$
0
0

Hello All,

I am facing a problem in cube writeback section. I have two measures Price and QTY. There is another  calculated measure named as Sales which is Price*Qty. now i want to forecast my sales for future period. Price is fixed and when i change the Qty then it display correct for model level but for all models the total is wrong. calculation like following

 QtyPriceSales
 11010
 21020
 505250
Total53251325
it shd be5325280

one more thing i wanted to highlight is that in write back table it only insert QTY. is there anyway i can ask it to save Price and sales as well. so that when it bring back after publishing it gave me good result. any help on this appreciated.

Thanks

Sneh

 

Facing issues while connecting to cube from excel 2010

$
0
0

Hi,

I am getting the following error while trying to connect cube from excel .



SQL server is 2008 R2 and excel 2010. I tried one of the solutions by using regsvr32 msolap110.dll. But still i am facing the issue. Please help me in fixing the issue.

Thanks,

Ganesh

Viewing all 14337 articles
Browse latest View live


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