如何在 DAX 中添加/减去两列值

问题描述 投票:0回答:1

下面的代码如何写更高效?非常感谢。

 Total Operating Profit = 

var _totOther =
CALCULATE(
    [Actuals - Currency] 
    ,dimAccount[FS Header Description] = "Total Other Operating(Inc)/Exp")

var _direct =
CALCULATE(
    [Actuals - Currency] 
    ,dimAccount[FS Header Description] = "Direct Overhead without Allocations")

var _Result = _totOther  +  _direct 

RETURN _Result
powerbi dax powerbi-desktop measure
1个回答
0
投票

试试这个:

Total Operating Profit = 


    [Actuals - Currency]( 
    dimAccount[FS Header Description] IN {"Total Other Operating(Inc)/Exp", "Direct Overhead without Allocations"})
© www.soinside.com 2019 - 2024. All rights reserved.