[英]Power BI (DAX): Distinct Count Filtered by Condition
I have a data set with publishers with revenue by month.我有一个按月收入的出版商数据集。 Publishers are considered to be "active" month if their revenue is equal or greater than 1000 for a given month.
如果发布商在给定月份的收入等于或大于 1000,则将其视为“活跃”月份。
Now, I want to count the distinct number of "active" publishers over a monthly trend using Power BI (DAX).现在,我想使用 Power BI (DAX) 计算每月趋势中“活跃”发布者的不同数量。
Example Data Set示例数据集
Here is a measure formula that I attempted:这是我尝试的度量公式:
DistCountActiveMonths = CALCULATE(DISTINCTCOUNT('Net Revenue Data'[Publisher Name]),FILTER('Net Revenue Data','Net Revenue Data'[Active Month]=1))
Please advise how to correct this formula to achieve the desired result, eg:请告知如何更正此公式以达到所需的结果,例如:
DistinctCountActiveMonths =
CALCULATE(
DISTINCTCOUNT( 'Net Revenue Data'[Publisher Name] )
,'Net Revenue Data'[Active Month] = 1
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.