简体   繁体   English

表中的度量Power BI总计错误

[英]Wrong total of a measure Power BI in a table

I have 2 tables with data: Rapport 1 and Engagement_TagData. 我有2个数据表:Rapport 1和Engagement_TagData。

I have the following values: Chargeable Hours , DnA Team Hours ( a measure) in Rapport 1 and inclus ( a measure) in Engagement_TagData that has the values 0 or 1. I created a measure HeuresFinales that goes like: if inclus is 1 it'll take the value in Chargeable Hours , if it is 0 , it'll take the value in DnA Team Hours , but the total value for HeuresFinales is wrong, it gives me the same total as for Chargeable Hours. 我有以下的值: 可充电时间 ,在融洽1和inclus(量度)在Engagement_TagData DNA队小时 (量度),其具有0或1。我创建的量度HeuresFinales即是这样的值:如果inclus1它将以“ 收费小时”中的值作为单位,如果为0 ,则将以“ DnA 团队小时”中的值作为单位 ,但是HeuresFinales的总值是错误的,它的总和与“收费小时”相同。

在此处输入图片说明


The total value for HeuresFinales should be less than the total for Chargeable Hours. HeuresFinales的总值应小于“收费时间”的总值。

Can someone help me find the right DAX function the get the right total for HeuresFinales. 有人可以帮助我找到合适的DAX函数,为HeuresFinales获得合适的总数。

Thanks! 谢谢!

Try enclosing your DAX function in a SUMX iterator over the Report 1 table to force row level calculation also when computing a total value. 在计算总值时,请尝试将DAX函数包含在Report 1表的SUMX迭代器中,以强制执行行级别的计算。

    SUMX (
        'Rapport 1' ;
        IF ( 
            Max(Engagements_TagData_Reviewed[inclus]) = 1 ;
            'Rapport 1'[Chargeable Hours] ;
            'Rapport 1'[DnA Team Hours]
        )
    )

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM