admin管理员组文章数量:1356872
How can I add ALL(UPS) to the following measure, so the card value will remain the same:
Measure = VAR Total_Sum = (SUM('UPS'[1st_UPS]) + SUM('UPS'[2nd_UPS])) VAR Non_Zero_Count = SUMX('UPS',IF('UPS'[1st_UPS] = 0, 0, 1) + IF('UPS'[2nd_UPS] =0, 0, 1)) RETURN if(Non_Zero_Count=0,0,Total_Sum/Non_Zero_Count)
How can I add ALL(UPS) to the following measure, so the card value will remain the same:
Measure = VAR Total_Sum = (SUM('UPS'[1st_UPS]) + SUM('UPS'[2nd_UPS])) VAR Non_Zero_Count = SUMX('UPS',IF('UPS'[1st_UPS] = 0, 0, 1) + IF('UPS'[2nd_UPS] =0, 0, 1)) RETURN if(Non_Zero_Count=0,0,Total_Sum/Non_Zero_Count)
Share asked Mar 31 at 2:22 cghantacghanta 373 bronze badges New contributor cghanta is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.1 Answer
Reset to default 1You need to use CALCULATE to be able to use ALL :
Measure =
VAR UPS_Table =
CALCULATETABLE('UPS', ALL('UPS'))
VAR Total_Sum =
SUMX(UPS_Table, 'UPS'[1st_UPS] + 'UPS'[2nd_UPS])
VAR Non_Zero_Count =
SUMX(
UPS_Table,
IF('UPS'[1st_UPS] <> 0, 1, 0) + IF('UPS'[2nd_UPS] <> 0, 1, 0)
)
RETURN
DIVIDE(Total_Sum, Non_Zero_Count, 0)
本文标签: powerbiPower BIhow to all ALL(Table) to a measureremove all filtersStack Overflow
版权声明:本文标题:powerbi - Power BI - how to all ALL(Table) to a measure - remove all filters - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743969864a2570559.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论