簡體   English   中英

在Power Pivot中將MDX結果轉換為Excel

[英]MDX results to Excel in Power Pivot

我不知道MDX的ABCD。 我有我的前任向我提出的這個查詢,並且一年僅需要一次! 一年中的那個時間恰好是現在! 查詢運行並返回結果。 但是,我無法從SSAS結果窗口中復制結果以及行名和列名。

谷歌搜索,我找到了鏈接服務器的選項,設置了查詢選項以使用SSIS包和PowerPivot將結果保存為csv等。

由於數據庫上的限制,前兩個不可能。 我需要遍歷一系列公司障礙以獲得必要的權限。

SSIS程序包和Power Pivot-具有相同的問題。 “ BUD”是一個命名集,在以下select語句的過濾器中被引用。 兩個SSIS(在OLEDB Source中鍵入時)都將引發錯誤-找不到尺寸[BUD]。

使用PowerPivot,我分別執行了set create語句,然后僅將代碼粘貼在“ WITH”之后。 錯誤是-找不到尺寸[BUD]。

在Power Pivot或SSIS的select語句中如何引用BUD的任何幫助? 我正在使用sqlsever2008r2。

這個程序-

create set [DB1].BUD AS
nonemptycrossjoin(

    {[Market].[Markets].&[Europe].children,[Market].[Markets].[Part of World].&[Africa].children},
    [Product].[PL].&[CD] : [Product].[PL].&[KZ],
    [Plant].[Plant].children
) go


with 

member measures.callsCY1 as
/* Lot of measure calutaions here */

select 
non empty
{
[Measures].[Qty Sold],
callsCY1,costCY1,MTRLcostCY1,LabourCostCY1,
SCR_C,callsRY1,costRY1,MTRLcostRY1,LabourCostRY1,
callsCY2,costCY2,MTRLcostCY2,LabourCostCY2,
callsRY2,costRY2,MTRLcostRY2,LabourCostRY2,
callsCY3,costCY3,MTRLcostCY3,LabourCostCY3,
callsRY3,costRY3,MTRLcostRY3,LabourCostRY3
}
*
{[Report Period].[Report Periods].[Quarter].&[2013-01-01T00:00:00] : [Report Period].[Report Periods].[Quarter].&[2014-06-01T00:00:00]}
on 0,
non empty
filter(
bud, [Measures].[Qty Sold] <> 0 OR [Measures].[QTY Service Calls] <> 0)
on 1
from [db1]

芽需要分開嗎? 你不能只用這個嗎?

with 
set [BUD] AS
nonemptycrossjoin(

    {[Market].[Markets].&[Europe].children,[Market].[Markets].[Part of World].&[Africa].children},
    [Product].[PL].&[CD] : [Product].[PL].&[KZ],
    [Plant].[Plant].children
)
member measures.callsCY1 as
/* Lot of measure calutaions here */

select 
non empty
{
[Measures].[Qty Sold],
callsCY1,costCY1,MTRLcostCY1,LabourCostCY1,
SCR_C,callsRY1,costRY1,MTRLcostRY1,LabourCostRY1,
callsCY2,costCY2,MTRLcostCY2,LabourCostCY2,
callsRY2,costRY2,MTRLcostRY2,LabourCostRY2,
callsCY3,costCY3,MTRLcostCY3,LabourCostCY3,
callsRY3,costRY3,MTRLcostRY3,LabourCostRY3
}
*
{[Report Period].[Report Periods].[Quarter].&[2013-01-01T00:00:00] : [Report Period].[Report Periods].[Quarter].&[2014-06-01T00:00:00]}
on 0,
non empty
filter(
bud, [Measures].[Qty Sold] <> 0 OR [Measures].[QTY Service Calls] <> 0)
on 1
from [db1]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM