英文:
How to count row by filtering the value using wildcard using DAX in powerbi?
问题
我想通过使用两个筛选条件来计算一行。一个筛选条件使用通配符。我尝试了这个,但结果是计算了所有类别的行,看起来筛选条件没有起作用。
我要计算'BI - 22'[Category]
等于Image and Data
并且'BI - 22'[Creator]
包含字符串Support
的行数。
我是PowerBI的新手,有人可以给我一些建议吗?非常感谢,谢谢!
英文:
I would like to count a row by having 2 filter. 1 filter is using wildcard.
I tried this, but the result is calculate all the row of category, looks the filter is not working
IF(CONTAINSSTRING('BI - 22','BI - 22'[Creator]="*Support*", COUNTAX('BI - 22', 'BI - 22'[Category]="Image and Data")
I am going to count the row of 'BI - 22'[Category]
when the value is equal to Image and Data
and the 'BI - 22'[Creator]
is contain of this string Support
.
I am newbie with powerbi, anyone can give me idea please.
I really appreciate, thank you
答案1
得分: 1
以下是翻译好的部分:
Count =
COUNTROWS(
FILTER(
'BI - 22',
'BI - 22'[Category] = "Image and Data"
&& CONTAINSSTRING('BI - 22'[Creator], "Support")
)
)
[![enter image description here][1]][1]
<details>
<summary>英文:</summary>
Here you go.
Count =
COUNTROWS(
FILTER(
'BI - 22',
'BI - 22'[Category] = "Image and Data"
&& CONTAINSSTRING('BI - 22'[Creator], "Support")
)
)
[![enter image description here][1]][1]
[1]: https://i.stack.imgur.com/3ifL0.png
</details>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论