是否可以计算幂bi中列中文本字段的计数

问题描述 投票:0回答:1
2024 Customer = CALCULATE(DISTINCTCOUNT(Table1[Group]),TREATAS({2024},Table1[Year]))
Lost 2024 = IF([2024 Customer]=0,"LOST")

enter image description here

我使用上述措施在表中将丢失的客户显示为“LOST”,我需要获取“LOST”的计数。有人有解决办法吗?

excel powerbi dax
1个回答
0
投票

我认为您是在问如何计算度量值的行数。

尝试:

Lost count =
  SUMX(
    DISTINCT(Table1[Group]), 
    IF([Lost 2024] = "LOST", 1)
 ) 
© www.soinside.com 2019 - 2024. All rights reserved.