Analysis :: How To Union 2 MDX Query Results From 2 Cubes

Nov 12, 2015

How can I UNION two MDX query results which are deriving from 2 cubes?MDX queries will return same ROW information and only Measure names will be different.

View 8 Replies


ADVERTISEMENT

Displaying Distinct Results From Union Query

Aug 31, 2000

I've got a union query (below)and it returns rows that have duplivate itemno's, descrip's, imsrp3's, and imsrp4's, while the remaining columns are not duplicate for the same row. An Excel report uses this query to populate itself and for a more visually appealing look, I'd like to skip the duplicated columns in the display. I'm not sure how to use the Distinct or Group by in this case, since technically I'm dealing with two separate queries, neither one separately returning any duplicate rows.
thanks for any suggestions...

~
select itemno,descrip,imsrp3,imsrp4,qoh,border,wadcto,wad oco,
watrdj,wapddj,wauorg,wauser
from nowo
where nowo.wasrst <='40'
union
select itemno,descrip,imsrp3,imsrp4,qoh,border,wadcto,wad oco,
watrdj,wapddj,wauorg,wauser
from nopo
where nopo.wasrst <='499'

View 1 Replies View Related

Insert Into Temp Results Of A Union Query

Nov 20, 2007

Hi,
I have follwing union query. I want to put this all in a temp table.

select Store_Id,batchnumber
From
Adjustments where updatedDt between '10/30/2007' and '11/20/2007' and Store_id in(8637 ,8641)
group by Store_Id, batchnumber
Union
select DestinationId,b.batchNumber
from
batch b
inner join Carton C on C.Carton_Id = b.General_ID
inner join Document d on d.Document_Id = c.Document_Id
where b.BatchType = 'Warehouse' and b.TranTable = 'Carton'
and (d.DestinationId in (8637 ,8641) ) and c.UpdatedDt Between '10/30/2007' and '11/20/2007'
Union
select d.DestinationId,b.Batchnumber
From
batch b
inner join Document d
on d.Document_Id = b.General_Id
where b.BatchType = 'TransferIn' and b.TranTable = 'Document'
and (d.DestinationId in (8637,8641) ) and d.UpdatedDt Between'10/30/2007' and '11/20/2007'
Union
select d.SourceId,b.batchNumber
From
batch b
inner join Document d
on d.Document_Id = b.General_Id
where b.BatchType = 'TransferOut' and b.TranTable = 'Document'
and (d.SourceId in (8637,8641) ) and d.UpdatedDt Between'10/30/2007' and '11/20/2007'
order by batchnumber

Kindly advice.

Thanks
Renu

View 2 Replies View Related

About Cubes In Analysis Manager

Feb 13, 2003

Hi all,

I am working on datawarehouse
using sql server analysis manager.
I created a cube ..that is working fine
but now i have to distribute to end users
so how to do it and how many ways we can do that

1)can we make that .cub file
2)how can give access to endusers
without giving access to database
3)how to host a cube and access from
excel or any other software

Thanks
J

View 6 Replies View Related

Data Cubes Using MS Analysis Services

Jan 6, 2006

I need to use cubes in VS 2005 web project. I have no clue how to create cubes or use them in my web page. I am familiar with Reporting Services but not cubes.
thanks in advance!
 

View 4 Replies View Related

SQL Server And Analysis Services (Cubes)

Aug 7, 2002

Hi, i want to back up my SQL Server database and the cubes i've made on the anaysis services


i have backed up the SQL server database wihtthe wizard, and i do not know how to back up the cubes..

Is it possible, and if so, HOW??

thanx
reply @
nouman@emirates.net.ae

View 1 Replies View Related

Analysis Service: How Can I Process Cubes?

Oct 11, 2004

how can I process and update cubes automaticly every night ?

Thanks

View 1 Replies View Related

Analysis Serices, Cubes And Access

Jul 20, 2005

How to get data from cubes in analyses manager to MS access using forexample ODBC ? Does existe any other posibilities to get data from cubesdirectly to the accees ?thanksKris

View 1 Replies View Related

Analysis :: Data Encryption For Cubes

Apr 30, 2015

One of my client requires TDS for all databases. My BI product has reports with OLAP Cube as data source. 

How about using BitLocker for the HDD where the abf is physically located.

View 6 Replies View Related

Analysis :: Copy Roles Between 2 Cubes

Jun 5, 2007

I work with 2 cubes on live and one for development. I've set the roles in the live cube (using SQL Server management studio). If i go to the design mode of the cube the new roles are not there, so deploying the cube will not update the development cube with the roles. How one can easily copy roles between cubes. (adding them manually would be a lot of work because there are quite a lot of different roles).

View 5 Replies View Related

Analysis :: Dynamic MDX - Select From 2 Cubes

Sep 2, 2015

I am trying to select from 2 cubes. in one condition - select .. From CubeX, and in sec Condition Select .. From CubeY.

I tried to put the name of the Cube as parameter:
SELECT ...
FROM @CurrentCube

in ssrs source and i got the message:
------------------------------
Failed to parse the query to detect if it is MDX or DMX. Error: 'Query (148, 6) Parser: The syntax for '@CurrentCube' is incorrect.' (MDXQueryGenerator)
------------------------------

Also tried to get the name of the Cube as Member (I have a property with the name of the cube),and than using the member to the select :

WITH MEMBER [CurrentCube] AS
...[dim name].CURRENTMEMBER.PROPERTIES("Cube")
SELECT ...
FROM [CurrentCube]

It didnt work too.. Is it Possible at all make the Cube-name dynamic?!

View 5 Replies View Related

Use Cubes From Analysis Services 2005 To Analysis Services 2000

Oct 17, 2007

Hi,

I have some questions about SQL Servers 2000 and 2005 compatibility.
In my configuration I have to use both servers.
The cubes are stocked in 2005 server.
May I transfer from 2005 to 2000 Analysis Services the cubes?

If yes, what is the procedure? The result of migration is the same in the two different versions?


If not, how can I solve this problem?

Thanks in advance.

View 3 Replies View Related

Analysis :: Partition Process Error In One Of Cubes

Jun 2, 2015

I am getting partition process error in one of my cubes. I don't have any clue what could be the workaround with this.

View 2 Replies View Related

Analysis :: How To Extract Data From SSAS Cubes Into A Table

Jun 19, 2015

I need to extract data from SSAS' cubes into a SQL Server table.

I already read examples using Linked server (with openquery), SSIS, etc. However, the result always return as many columns per dimension as levels. I need to extract all members of a dimension in a column. E.g., when excecuting the following MDX query in Adventure Works 2014:

select [Measures].[Sales Amount] on columns,
       Non Empty [Date].[Calendar].members on rows
  from [Adventure Works]

I would like to get this result (MDX query in SSMS), but with keys displayed intead of names:

But I get this (MDX thru openquery or SSIS):

View 4 Replies View Related

Analysis :: Creating Cubes In SSAS Using Various Tables In Excel

Jun 29, 2015

I'm exploring creating local cube files, .cub from an excel sheet with tables.Would SSAS be able to create one cube from taking data from a 1 way table (A, B, C), a 2 way table (AxB, BxC, AxC) and a 3 way table (AxBxC)?

View 4 Replies View Related

Analysis :: Create OLAP Cubes Using NAV 2009 SP1 Database

Feb 13, 2012

I am attempting to create som OLAP cubes using the NAV 2009 SP1 database. I am using Jet Enterprise with TimeXtender4 to build the cubes.

View 5 Replies View Related

Analysis :: How To Use Stored Procedure In SSAS To Combine Result From More Than Two Cubes

Jul 15, 2015

I have two cube and i would like to get data from both cube and combine the results from both cubes to get final result to display result in SSRS reports like we can do in Stored procedure using temporary tables/Joins.Is there any way in SSAS to combine the data from multiple cubes? Data needs to be retrieved from the cubes based on the user inputs.

View 3 Replies View Related

Analysis :: Excel Freezing When Interacting With Microsoft Dynamics AX Cubes

May 7, 2015

I am running into a problem where Excel 2010 is freezing when I try to work with data coming from a Microsoft Dynamics AX 2012 R3 pre-built cube.

What is happening is that when I go to add a second dimension to my pivot table, excel locks up and becomes completely unresponsive for at least 2 hours.  If I add the dimension to the table before the measure though, everything is fine.

For Example, I am trying to build a sales report with the product name and customer name as dimensions, and Sales as the measure. If I add the product name to my pivot table as a column and then sales as a measure, Excel will freeze when I try to add the customer dimension. However, if I add both dimensions to the pivot table first and then the measure, Excel seems to work fine.

View 2 Replies View Related

How To Access Analysis Service 2005 Cubes Through Normal Stored Procedure

Apr 2, 2007



Hi,



Can anybody tell me How to access Analysis Service 2005 cubes through normal Stored Procedure.



Basically can write a stored procedure that we normally write in database service and use it access the Analysis Service 2005 cubes.



Is it possible



Regards,

gokul

View 1 Replies View Related

Analysis :: Grand Totals Not Adding Up In Power View On Molap Cubes?

Nov 12, 2015

My Power view reports do not show the grand totals correctly.  I think my issue relates perfectly to [URL]. However we have updated service pack 2 on both the sql data warehouse and the ssas box.  They are 2012.  However the power view is still incorrect.  Pivot tables seem to work just fine.  In AS I have a 2 separate measure groups that has a total count.  I then use mdx to bring those two together.  Something I have done many times in past with as 2008.  My mdx looks like this below.  I then hide Total Count EC (from measure group 1) and Total Count SF (from measure group 2). This way I have 1 total count value and they can use another dimension to see the two separate if needed. 

CREATE
MEMBERCURRENTCUBE.MEASURES.[Total
Count New] AS
//
([Measures].[Total Count] + [Measures].[Total Count SF]),
DISPLAY_FOLDER
=
'Totals', 
ASSOCIATED_MEASURE_GROUP=
'Report',
FORMAT_STRING
=
"#,#0",
VISIBLE=
1;

The measure Total Count EC works just fine but the Total Count (MDX) does not .  All in Power Pivot works fine but in Power View the grand totals are not correct.

View 3 Replies View Related

Analysis :: Tracking Information About No Of Connections Made To SSAS Cubes Through Excel Files

Sep 29, 2015

Is there any way to track the information about the  connections to SSAS cubes through local  Excel files (BI usage).

OPreviously, we are tracing the information about the BI usage through the BI SharePoint site. Now we want track the users who are using through local excel files .

View 9 Replies View Related

Analysis :: Can Applications Connect To SSAS Tabular Mode Cubes Through ODBC Drivers?

Aug 26, 2015

Can applications connect to SSAS Tabular mode cubes through ODBC drivers? I have been asked the question specifically regarding SAS, and I can see (for example) SAS Enterprise Guide has the ability to connect to sources via ODBC, so I now need to find out if there are such things as ODBC divers for SSAS (specifically Tabular).

View 3 Replies View Related

Using Top To Get Set Number Of Results From A Union

Jan 30, 2008



I would like to get the top 5000 records from a union. The oringinal query is

SELECT * from tbl_A WHERE fld_Id = 0
UNION ALL
SELECT * from tbl_B where fld_Id = 0

I thought that the I could do:
SELECT TOP 5000 * FROM
(

SELECT * from tbl_A WHERE fld_Id = 0
UNION ALL
SELECT * from tbl_B where fld_Id = 0
}

This gives me a syntax error that I cannot figure out.

Any ideas?

View 3 Replies View Related

Analysis :: Two Sets Specified In UNION Function Have Different Dimensional

May 14, 2015

I am using following Query to get data from Cube for some dates and Quarters at single time, but I am getting an error "Two sets Specified in the UNION function have different dimensional".

WITH 
MEMBER [Measures].[Data Value1] 
AS [Measures].[Average Value]
SELECT 
{UNION(
([DimPeriodType].[Period Type Key].&[1],[DimDate].[Date Key].&[20150428],[DimEnergyCalculated Ratio].[Calc Ratio Key].&[1],[Measures].[Data

[code]....

View 3 Replies View Related

Union Changing Column Results?

Feb 3, 2005

I have a problem with a union all that seems to be changing the results of a column based on using the union, when I run the querys separatly I get the expected results in the field!

Basically 3 queries pulled together for reporting purposes.

Orders (which can include a gift so the gifts are separated in the second query).
OrderGifts (pulled out of the orders).
Gifts (straight gifts with no associated orders).

The problem is showing up in the first ORDERS query. I can pull a specific order and the calculation for the AMOUNT(eg:$15.20) is correct, but when I combine the tables I get a different AMOUNT(eg:$15.199999999999999).

Here are the values for the fields in the amount calc:
totitems=12.9500
totcredits=.0000
discount=.0000
tax=.0000
refund=.0000
convrate=1.0
postage=2.2500
giftamt=15.0000


I tried converting each of the fields to an decimal befre the calc and same results

I tried ROUND and same thing!

I have been trying to chase this down all day, cant figure out what the problem is or how to get around it...whats going on here I am missing?


Here is the query, if you need any other info just let me know, I would GREATLY appreciate ANY direction of figuring this out!


select * from
(
--orders
select
acctnbr as PartnerId,
'O' as TrnType,
ordnbr as TrnId,
0 as FundId,
odate as WorkDate,
adate as PostDate,
sdate as ShipDate,
cast(
(
IsNull(totitems, 0) -
IsNull(totcredits, 0) -
IsNull(discount, 0) -
IsNull(tax, 0) -
IsNull(refund, 0) +
IsNull(postage, 0)
) * IsNull(convrate, 1)
as Decimal(10,2))
as Amount,
batchnbr as BatchId,
motvcode as MotivationCode,
currcode as CurrencyType,
Status,
paycode as PaymentType,
paytype as CardType,
paynbr as CardNbr,
expire as CardExpire,
ChargeAuth,
ConvRate,
MediaCode,
hcf.dbo.KmaiProjMotvTest(0,motvcode) as ProjMotvName
from kmai.dbo.o01omst

UNION all

--orders gifts
select
acctnbr as PartnerId,
'G' as TrnType,
giftref as TrnId,
giftfundid as FundId,
odate as WorkDate,
null as PostDate,
null as ShipDate,
ROUND((giftamt * IsNull(convrate, 1)),2) as Amount,
batchnbr as BatchId,
giftmotvcode as MotivationCode,
currcode as CurrencyType,
Status,
paycode as PaymentType,
paytype as CardType,
paynbr as CardNbr,
expire as CardExpire,
ChargeAuth,
ConvRate,
MediaCode,
hcf.dbo.KmaiProjMotvTest(giftfundid,giftmotvcode) as ProjMotvName
from kmai.dbo.o01omst
where adate is null
and giftfundid <> ''

UNION ALL
--gifts
select
acctnbr as PartnerId,
'G' as TrnType,
gh.giftref as TrnId,
convert(int, fundid) as FundId,
gdate as WorkDate,
applydate as PostDate,
null as ShipDate,
ROUND((IsNull(gd.amt, 0) * IsNull(convrate, 1)),2) AS Amount,
batchnbr as BatchId,
motvcode as MotivationCode,
currcode as CurrencyType,
Status,
paycode as PaymentType,
paytype as CardType,
paynbr as CardNbr,
expire as CardExpire,
ChargeAuth,
ConvRate,
MediaCode,
hcf.dbo.KmaiProjMotvTest(fundid,motvcode) as ProjMotvName
from kmai.dbo.g03ghdr gh
inner join kmai..g04gdtl gd
on gh.giftref = gd.giftref

)
UnionOfGiftsAndOrders

View 4 Replies View Related

Union Two Sets (consolidating Results)

Jul 8, 2015

Code:
SELECT DISTINCT LEFT([REPORTING_MONTH], 4)+'-'+SUBSTRING([REPORTING_MONTH],5,6) as REPORTING_MONTH, t.EMPLOYEE,
'' as COUNT_FTP,
CASE WHEN [MEDIUM_RCVD] = 'EMAIL' THEN COUNT(MEDIUM_RCVD) ELSE '' END AS COUNT_EMAIL
FROM [GPO].[dbo].[DW_SUBMISSION] as s
JOIN #TEMPActivity as t

[Code] ....

I'm trying to get the set to come out all on one line. REPORTING_MONTH, EMPLOYEE, COUNT_FTP, COUNT_EMAIL

But when I try null or '' it creates a second record and doesn't merge the two results.

View 3 Replies View Related

Results Of Union Into Temp Table

Apr 3, 2008

This may be a dumb question, but I can't seem to get the syntax right. I have two temp tables that have the same columns, I want to do a union on them and store the results in a temp table. Any ideas?

Ie.

select * from #tmpTable1
union
select * from #tmpTable2
into #tmpTable3

Thanks!!!

View 4 Replies View Related

Analysis :: ASMCD To Sync Cubes From Cubebuild Server To Reporting Server

Jul 7, 2015

we are using ASMCD to sync our cubes from a Cubebuild Server to a Reporting Server. We migrated some days ago from 2012 to 2014. We are also using rel. Engine with StoredProcs for calling and executing xp_cmdshell for the Ascmd.Actually all works fine for our smaller cubes. For the bigger one we got the following issue. The cube is being synced but the proc delivers error.In the log we found this entry:

(7/7/2015 11:26:22 AM) Message: The directory '?D:SSAS_DATAGPMR Local CNTR.510.dbLocal Controlling Cube.0.cub' could not be deleted. Please check the directory for permissions.
(Source: ?D:SSAS_LOGmsmdsrv.log, Type: 3, Category: 289, Event ID: 0xC1210020)
(7/7/2015 11:26:34 AM) Message: The directory '?D:SSAS_DATAGPMR Local CNTR.510.db' could not be deleted. Please check the directory for permissions.

[code]...

View 2 Replies View Related

Analysis :: Create A Calculated Set From Union Of Values In Two Sets?

Oct 26, 2015

I have the following MDX Query:

Select {measures.[Dollars]} on 0,
non empty
[Divisions].[Division].[All].Children *
[Cost Centres].[Cost Centre].[All].Children
[Locations].[Locations].[All].Children
on 1
From MyCube

which produced the following table:

Division
 Cost Centre
 Location
 Dollars
AA
1
X
$30.00

[code]....

What I am hoping to do is create a set out of the Union of specific values in the [Cost Centres].[Cost Centre] and [Locations].[Locations] hierarchies into a single set and use that new set in my MDX query across the columns.

Using the table and query from above, I have the following conditions that would determine the value in the set (lets call the new set 'NewSet')

When Cost Centre = 1 and Location = X Then "CustomType1"
When Cost Centre = 1 and Location = Y Then "CustomType2"
When Cost Centre = 1 and Location = Z Then "CustomType3"
When Cost Centre = 2 and Location = Y Then "CustomType4"
When Cost Centre = 2 and Location = Z Then "CustomType5"Else "Default"

Then, if I was to execute the new query:

with

set NewSet as "Some Unknown Magic Here"

Select {measures.[Dollars]} on 0,
non empty
[Divisions].[Division].[All].Children *
{NewSet}
on 1
From MyCube

I would end up with 

Division
 NewSet
Dollars
AA
CustomType1  
$166.64
AA
CustomType3 
$64.24
BB

[code]....

View 2 Replies View Related

Transfer Data(Cubes&#043;virtual Cubes) From Sql2000 To Sql 2005

Jun 6, 2006

Süleyman writes "I want to transfer databases with cubes and virtual cubes from SQL 2000 Analysis Server to SQL 2005 SQL Express.

1.how i can transfer the cubes?

2.how i can transfer the virtual cubes?

3.Why i see the tables(saw)and the cubes in SQL Managment only under Tables together and nothing under cubes?

Please help me
many thanks

Süleyman from Germany/Frankfurt am Main"

View 1 Replies View Related

Is There A Way To Hold The Results Of A Select Query Then Operate On The Results And Changes Will Be Reflected On The Actual Data?

Apr 1, 2007

hi,  like, if i need to do delete some items with the id = 10000 then also need to update on the remaining items on the with the same idthen i will need to go through all the records to fetch the items with the same id right?  so, is there something that i can use to hold those records so that i can do the delete and update just on those records  and don't need to query twice? or is there a way to do that in one go ?thanks in advance! 

View 1 Replies View Related

Analysis :: Statistical Function Results In Calculated Members

Jul 8, 2015

I'm working with the statistical functions Stdev and Median with calculated members.  The only way I can get the "correct" answer is if I have a dimension at the same granularity as the Fact table (Actually it's a degenerate dimension of the FACT table itself).  Otherwise it seems that the measure I'm using with Stdev returns results that are so wildly high, I think it must be acting on the SUM of the measure; because the measure itself is a Summed one. When I try to use the coordinates in the Stdev function, it seems like it is using the wrong set of data points :

stdev( ( [Date].[Date].[Date].members, [Parameter].[Parameter].[Parameter].members ), [Measures].[Value])  returns answers in the thousands when it should be more like 2.5

When used with a query, there would only be a single date member and a specific parameter member.  The total number of fact records is between 200 and 500 with values that range between 0 and 150.  This is the version that gives me answers that resemble the total sum of the [Measures].[Value].

If I add the dimension that is essentially a row number from the fact table, it gives the right answer (slowly, but that will be a different post ....

stdev( ( [Date].[Date].[Date].members, [Parameter].[Parameter].[Parameter].members, [FACTTable].[FACTTable].[KeyField].members ), [Measures].[Value])

View 4 Replies View Related

Need To Display Results Of A Query, Then Use A Drop Down List To Filter The Results.

Feb 12, 2008

Hello. I currently have a website that has a table on one webpage. When a record is clicked, the primary key of that record is transfered in the query string to another page and fed into an sql statement. In this case its selecting a project on the first page, and displaying all the scripts for that project on another page. I also have an additional dropdownlist on the second page that i use to filter the scripts by an attribute called 'testdomain'. At present this works to an extent. When i click a project, i am navigated to the scripts page which is empty except for the dropdownlist. i then select a 'testdomain' from the dropdownlist and the page populates with scripts (formview) for the particular test domain. what i would like is for all the scripts to be displayed using the formview in the first instance when the user arrives at the second page. from there, they can then filter the scripts using the dropdownlist.
My current SQL statement is as follows.
SelectCommand="SELECT * FROM [TestScript] WHERE (([ProjectID] = @ProjectID) AND ([TestDomain] = @TestDomain))"
So what is happening is when testdomain = a null value, it does not select any scripts. Is there a way i can achieve the behaivour of the page as i outlined above? Any help would be appreciated.
Thanks,
James.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved