测量功率

时间:2019-04-26 04:48:19

标签: powerbi measure powerbi-desktop

我现在在qliksense中有这个公式,我想做这个功能,但这显示了一些错误..

我尝试过

Total_Sales_Varaible = if('VBRK_BillingDocument_Header'[Billing Doc.currency_WAERK]="USD",SUM

但总和之后我无法做到

我在qliksense中有此代码

if([Billing Doc. currency_WAERK] = ('USD'),
sum({< Fiscal_Year = {'2016','2017'},[Billing Type_FKART] -={'ZG2','ZL2'}>}[Billing Sales Amount_NETWR])*vCurrency,
sum({< Fiscal_Year = {'2016','2017'},[Billing Type_FKART] -={'ZG2','ZL2'}>}[Billing Sales Amount_NETWR]))

1 个答案:

答案 0 :(得分:0)

您的源数据结构不清楚,但是类似:

Total_Sales_Variable = 
IF ( 
    VALUES ( 'VBRK_BillingDocument_Header'[Billing Doc.currency_WAERK] ) = "USD",
    [vCurrency],
    1
) * 
CALCULATE ( 
    SUM ( 'VBRK_BillingDocument_Header'[Billing Sales Amount_NETWR] ),
    FILTER ( 
        'VBRK_BillingDocument_Header',
        'VBRK_BillingDocument_Header'[Fiscal Year] = 2016 ||
        'VBRK_BillingDocument_Header'[Fiscal Year] = 2017
    ),
    FILTER ( 
        'VBRK_BillingDocument_Header',
        'VBRK_BillingDocument_Header'[Billing Type_FKART] <> "ZG2" &&
        'VBRK_BillingDocument_Header'[Billing Type_FKART] <> "ZL2"
    )
)