带有日期切片的前10个过滤器帕累托

时间:2020-02-27 16:45:39

标签: powerbi dax

下午好。

我在前10个州中创建了一个pareto图表,但是当我对数据切片应用过滤器时,“累积目标”的度量就会崩溃。

正确:enter image description here

错误:enter image description here

对于使用的措施:

Goals =
CALCULATE (
    SUM ( 'All domains - main data'[Value] );
    FILTER (
        'All domains - main data';
        'All domains - main data'[Attribute] <> "Goal Completions"
    )
)

Classification =
RANKX ( ALL ( 'All domains - main data'[Region] ); [Objectives];; DESC )

Cumulative goals =
CALCULATE (
    [Goals];
    TOPN (
        [Classification];
        ALL ( 'All domains - main data'[Region] );
        [Goals]; DESC
    )
)


Total =
CALCULATE (
    [Goals];
    ALLEXCEPT ( 'All domains - main data'; 'All domains - main data' )
)

% Pareto = [Cumulative targets] / [Total]

1 个答案:

答案 0 :(得分:0)

我不认为这行得通,但请尝试Cumulative goals

Cumulative goals =
SUMX (
    TOPN (
        [Classification];
        ALL ( 'All domains - main data'[Region] );
        [Goals]; DESC
    );
    [Goals]
)

TOPN中使用CALCULATE作为过滤器表有点奇怪。