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

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


msdmpump.dll crash in IIS

$
0
0

This is not a question. I am posting this in case others run into the same issue.

Scenario: stand alone web server, exposed to the internet, that we want to allow access to a SQL Server Analysis Services server behind a firewall. 

Followed installation procedure for MSMDPUMP.DLL (http://technet.microsoft.com/en-us/library/gg492140.aspx)

Additional steps;

1. Configured SSL cert for https and IIS binding to port 443 with the cert.

2. Port 2383 opened on the firewall between web server and SSAS server (for default SSAS instance)

3. Configured SPN's for http on the web server

4. Configured SPN's for MSOLAPSvc.3 on the SSAS server

5. Ensured I had the 64 bit version of the MSMDPUMP.DLL, since the web server was running a 64 bit OS.

Testing access with Excel, I got a bunch of strange error messages (account did not have access - sorry didn't keep them). IIS log looked clean. Diggin deeper, I found the following error in the Application Event log for every attempt to connect;

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

Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0eb
Faulting module name: msmdpump.dll, version: 11.0.3000.0, time stamp: 0x5081c428
Exception code: 0xc0000005
Fault offset: 0x00000000000dc7ac
Faulting process id: 0x16e8
Faulting application start time: 0x01cf43af7b3686b6
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: \\?\D:\inetpub\wwwroot\OLAP\msmdpump.dll
Report Id: b8ffa223-afa2-11e3-8da2-d8d385e039c6

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

Error 5 Looked like an access denied, which had me chasing my tail for a while.

Solution:

On a stand alone web server (i.e. one without any bits of SQL Server installed), you need to install the Analysis Services drivers (I installed both Microsoft® SQL Server® 2012 ADOMD.NET and Microsoft® Analysis Services OLE DB Provider for Microsoft® SQL Server® 2012 from the SQL 2012 Feature Pack (http://www.microsoft.com/en-us/download/details.aspx?id=29065) and MSXML 6 (http://www.microsoft.com/en-us/download/details.aspx?id=3988).

HTH

Mitch


Mitch vH

refusing to deploy

$
0
0

all 3 tables in the DSV select data (2 dims and 1 fact between them. i am running sql2016. my pc with visual studio connectinig to the server also 2016. I have eliminated all columns and I still cant get it to deploy so that I can browse the dimension. I haven't gotten to the cube yet


???

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

Excel 2013 unable to connect to Analysis Services

$
0
0

Hi,

First of all - I know this is not a rare error, but all the forum threads/posts I've found has given me zero to nothing help. So I decided to repost this issue in hopes for a solution.

We're running the "Cube" at, lets say, 10.0.0.10 and our clients are on a different network (172.1.1.X). Almost everyone can reach the cube by:

  • Starting Excel
  • Going to the "DATA" tab
  • "From other sources"
  • "From analysis services"

(Translated sv_SE -> en_US)

However, we have a 2 (out of 100) that's unable to connect to the cube. When they write the servername/ipaddress they *almost* instantly get a dialog box saying "Unable to connect to data source. Unable to locate database server. Verify that the database server name you entered is correct or contact the database administrator for help."

It's not the account - they can change computer and login, so there's something either locally or at the database server.

I've tried:

  • Disabling antivirus/firewalls
  • Disabling Windows Defender
  • Disabling Windows Firewall
  • Enabling "Telemetry Log" (gives 0 information)
  • What feels like every forum post on the interne

All clients, even those who can't reach it, are able to:

  • Ping the hostname and address
  • Telnets to port 2383 (found the port by using wireshark on a working connection)

Meaning all clients are able to reach the server and can successfully establish connections to it - so the pathway is clear.

If I issue

netstat -ano | find "2383" 

I get the clients ipaddress.

All clients are running Excel 2013 (though tested with Excel 2010) and they're activated. Checking the event log I only get the same information as the error message.

Does anyone have any ideas on this?

Thanks.

Best regards,

Anton

Grand Totals showing '#NA' when using cell data security

$
0
0
I have enabled cell data security in my multi-dimensional cube and while the security feature is working fine facing issues with Grand Total function. It's appearing '#NA'. Can you please help me here?

connection two fact tables with domension at different level of granuality

$
0
0

hello,

I saw similar cases that were  discussed on the other platforms but in my view there are  some  specific elements which treat that case as something different.

 

 

My problem is related to lack of knowledge how I should connect fact table named  History Data,  where the lowest level of granularity is 1 atm, settlement date, currency with another fact table named Cash Usage,  where the lowest level of granularity is country, settlement date, currency. I would like to drill down data using hierarchies which I created in Dimension named ATM Parameters ( eg. Hierarchy by Country, etc ).At the moment I cannot aggregate correctly  values ( withdrawals and cash at vault ) using hierarchy Country from ATM Parameters table. why?

Pleace advice me…

I caanot attach pictures ( I don't know why ) , but I may deliver details and structure of my cube on e-mail or in different way.

Regards,

Tomek


Add calculated member with filter in cube

$
0
0

Hi,

I have been searched in the net how to add calculated member with filter but i didn't found some result about that ,i found only how add calculated member in cube.

Suppose my fact table have the value as bellow :

SK     	         DimDate               Product                  Qty
1      	         20160501               1                       5
2	   	20160502	 	1			100
3      	        20160503		1			11
4	   	20160501		2			120
5	 	20160501		3			200
6	 	20160504		2			100
7	 	20160505		1			140
8	 	20160506		1			170
9	 	20160507		1			130
10	 	20160508		1			120

I want to add a  calculated member that contain the count(*) of my line witch the product equal to 1

How can i do that

Thanks


ssas design questions

$
0
0

I am new to using ssas and i would like to learn about a few things that I have encountered

1. I have a field in a dimension that is not unique. understand have to make a compound key. Should be the top field the value field followed by a key field to make it unique or the other way around?

2. what is the innate difference between a color_code and a text field in a dimension. ssas requires the text field to be unique, while the color field obvious has many duplicates? is there anyway to change the behavior of text fields to be like integer fields and permit duplicates?

3. the table under the dimension has a text column with is text-indexed as users search for any word within the field. how can I duplicate this behavior in ssas?

4. can I make a heirarchy based on the first 3 letters in a text field?

5. the messages during priocessing are in Hebrew even though the rest of the interface is in English. how can I change it to be totally in English?

 thanx

PS i have received no responses to my connection issue which I posted yesterday


???



Add calculated member with filter in cube

$
0
0

Hi,

I have been searched in the net how to add calculated member with filter but i didn't found some result about that ,i found only how add calculated member in cube.

Suppose my fact table have the value as bellow :

SK     	         DimDate               Product                  Qty
1      	         20160501               1                       5
2	   	20160502	 	1			100
3      	        20160503		1			11
4	   	20160501		2			120
5	 	20160501		3			200
6	 	20160504		2			100
7	 	20160505		1			140
8	 	20160506		1			170
9	 	20160507		1			130
10	 	20160508		1			120

when i create the cube by default we have a measure call Count this mesasure contain the value ofcount of my fact table

 I want to add a  calculated member that contain the count(*) of my line witch the product equal to 1

How can i do that

Thanks


Average a sum

$
0
0

Hopefully I can explain this sufficiently ... we have a table with a set of scores for various tasks and for each person carrying out these tasks, we need to calculate an overall score with a max score from each category. Given the below

Person	Code	Score
1	a	10
1	a	12
1	a	4
1	b	3
1	c	2
1	c	5
2	a	8
2	b	16
2	b	6
2	c	12
2	c	3
3	b	3
3	b	5
3	c	2
3	c	7
4	a	2
4	a	3
4	b	4
4	b	2
4	c	5
4	c	1


What we have is for each person, they have three tasks. We want to sum up their score for each task to a max of 20 points giving a priority to task a then b then c. Once we've determined the categorisation we then apply a multiplier depending on the task (multiply by 4 for task a, 3 for task b and 2 for task c). This will give us the following results

Person	a (*4)	b (*3)	c (*2)	total
1	20	0	0	80
2	8	12	0	68
3	0	8	9	42
4	5	6	6	50

Once we've got each person's total, we want to get the average.

So in SSAS, we want for each person, sum up their a, b and c scores, determine how many points in each task actually applies (i.e. stop when we hit 20 points in total) and apply the multiplier. I have attempted to use 

First get score for each task

a Score:=MAXX(SUMMARIZE( 'Person';'Person'[id]); CALCULATE(sum([Score]); 'Score'[Task] = "a"))
b Score:=MAXX(SUMMARIZE( 'Person';'Person'[id]); CALCULATE(sum([Score]); 'Score'[Task] = "b"))
c Score:=MAXX(SUMMARIZE( 'Person';'Person'[id]); CALCULATE(sum([Score]); 'Score'[Task] = "c"))

then limit to 20 across the board

a20:=IF([a Score]>20; 20; [a Score])
b20:=IF([b Score]+[a20]>20; 20-[a20]; [b Score])
c20:=IF([c Score]+[b20]+[a20]>20; 20-[b20]-[a20]; [c Score])

and then calculate the average

ave:=AVERAGEX(SUMMARIZE( 'person' ;'person'[Id])
                       ;CALCULATE([a20]*4 + [b20]*3 + [c20]*2; ))

I know there are a few faults

 - I have no idea what to use instead of "MAXX" in the first set

 - I'm certain I'm causing a double loop by doing the summarize in both the first set and the average calculation but no other "average" function likes the calculation as its entry (something about needs to be a single column)

The output would appear to be selecting the max score for the group (80 in my above example) rather than calculating the average (60) which as my best guess is because the MAXX is determining the 80 score and passing that back to the average for every person.

If I don't put the summarize section for the score calculations, it appears to be adding up the relevant task for ALL people rather than only that task for the current subject person.

Any suggestions highly appreciated!

A terrifying issue with SSAS Tabular 2016 - Cannot re-deploy calculated table without erasing partitions

$
0
0

Dear Gurus

I just discovered a Nasty thing with SSAS Tabular 2016 which I find highly outlandish. I am sincerely hoping this is just a bad dream and that there is a work around for it.

When you have a cube with a Huge fact table (billions of rows) that is partitioned, of course when you need to re-deploy a newer version of your cube metadata thatdid not undergo any changes on your big Table. What you would do is use thedeployment wizard and tick the "Retain Partitions" option.

Now if you have a calculated table, and if at some point you have to change its code a bit, if you re-deploy the way described above it does not work... of course since you choose not to erase your partitions. So what you would do is go to the cube through SSMS, right-click on table then choose partitions to update the DAX yourself... with my calculated table I get the following:



Is this a "Feature" ? If there is a fix for this could you please provide me with directions ?

Many many thanks for your much appreciated assistance

Miloud

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

 

SSAS Date data type doesnt work in Date Filter using Pivot Table

$
0
0

Hi,

I have a cube with date dim. For Date Dim, the key attribute (calendar key) column is integer, the Date attribute is Date datatype.

I am trying to connect to this cube through excel services 2010 (not power pivot) using pivot table and trying to generate reports.

Problem:

The report provides information based on dates like Year, Month, Day and so on.

I am selecting Year as a report filter and selecting Days in Rows.

The report gets generated perfectly.

Now, I am trying to apply row level filter on Days. This Days is date data type. I am trying to use Date Filter to filter the Days. This is where the issue is. When I am selecting any date filter say Current Quarter and so on the entire list of data goes off and it shows blank report.

Did some google and came across these links…

http://bidn.com/Blogs/userid/17/Cube-Date-Dimension-Filter-not-Working-in-Excel

https://social.msdn.microsoft.com/Forums/en-US/b1c0be3d-051b-4a21-892a-193d61741c77/ssas-date-fields-not-working-with-excel-date-filters?forum=sqlanalysisservices

I tried the same way and still not able to make it work.

Did anyone face this type of issue..? any help would be really helpful.

Anirban Biswas (v-anbis@microsoft.com)

Processing SSAS tabular model fails in sql agent

$
0
0

I have a new SSAS 2016 tabular model (1200 compatibility level). I am trying to set up a SQL Agent job to process the model daily. However, when the job runs, it is throwing the following error:

XmlaException. The { text node at line 7, column 17 cannot appear inside the Command element (namespace urn:schemas-microsoft-com:xmla-analysis) under Envelope/Body/Execute. This element can only have text nodes containing white-space characters.

The command is:

{"refresh":{"type":"full","objects":[{"database":"Finance"}]}}

This works ok when I execute it in SSMS, but fails when run via a SQL agent job.



non-additive fact is aggregating it value against dimension

$
0
0

I have one dimension DimDeals and one measure FactVolume. DImDeal table has deal and child values. every deal may have some number of values example:

DealChildKey  DealNumber Child
---------------------------------- -------------
1        D01    1
2        D01    2
3        D01    3
4        D02    1
5        D02    2
6        D03    1
7        D04    1

FactVolume table has different volumes values against Dealnumber and its child. now i want to browse the last child's Volume measure  value again deal as total Volume.
I created a cube where dimension deal has deal and child value hierarchy and Factvolume as Fact. i tried to keep volume as non additive and set its aggregated function as LastChild . but after processing this cube when i browse it on excel pivot. volume value get aggregated against delanumber. please help me to know that  how can i stop this measure to get aggregated.


Regards, Shanu

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.


Code for Creating SSAS Partition Automatically with AMO

$
0
0

Hi Everyone,

Please I need a VB or C# code I can use to create SSAS partition using SSIS Script Task (AMO).

Thanks!


me

DAX Calculated Collumn to aggregate count

$
0
0

Hi,

I have an Order table where the primary key is Order_ID. The table also contains Foreign Key Customer_ID and attribute Order_Category.

I want to create a calculated collumn IN the Order table that for each row Counts the number of Order_Category = "B" orders for each Customer_ID. Example:

Order_ID   Customer_ID  Order_Category   Number_Of_Orders

1                 20                  B                         2

2                 20                  B                        2

3                 23                  B                        1

4                 20                  A                         (blank)

It seems like a trivial task, but somehow I cant get it right, I tried with CALCULATE COUNTROWS/DISTINCTCOUNT combined with VAR and/or EARLIER, but I cannot get the correct output (In SQL it could be achieved by Countrows Partition(Over... etc.).

I need it to be a calculated collumn, so a measure that does the trick will not be the answer I am looking for.

Thanks alot.

Br Rasmus


how do i create the worldwideimporters tabular SSAS database?

$
0
0

I downloaded the 2016 SSRS technical preview which has the new functionality of having powerbi reports published locally.  I also downloaded the new wordwideimporters oltp and DW databases.  However I cant figure out, how do I create the tabular ssas cube from either of those?  On the codeplex page below it doesn't really mention if there even is a worldwideimporters associated tabular database.

any help would be appreciated.

https://github.com/Microsoft/sql-server-samples/tree/master/samples/databases/wide-world-importers

Viewing all 14337 articles
Browse latest View live