簡體   English   中英

SSAS 多維數據集的 MDX 中計算的百分比度量

[英]Calculated percentage measure in MDX for SSAS cube

我在使用 SSAS 多維數據集中的百分比計算度量時遇到問題。

CREATE MEMBER CURRENTCUBE.[Measures].[% Responded within SLA]
 AS Iif(Sum([Measures].[SLA Calc Flag])=0
        OR
        Sum([Measures].[Responded])=0,NULL,
    Iif(Sum([Measures].[Responded]) < Sum([Measures].[Responded - Breached]),NULL,
        Iif(Sum([Measures].[Responded - Breached])=0
            AND
            Sum([Measures].[Responded])>0,1,
                1-(Sum([Measures].[Responded - Breached])
                    /
                Sum([Measures].[Responded]))))), 
FORMAT_STRING = "Percent", 
VISIBLE = 1 ,  DISPLAY_FOLDER = 'Performance' ,  ASSOCIATED_MEASURE_GROUP = 'Measures'  ; 

這個

where 'SLA Calc Flag' is to filter out non-required records,
'Responded' is the total number of records,
'Responded - Breached'

是失敗記錄的數量。

我認為這應該可行,但我不斷收到。#VALUE 一旦部署了多維數據集。

我是個白痴。 我已經定義了一個名稱中帶有額外空格的度量。 刪除它,它立即工作。 繼續!

暫無
暫無

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

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