admin 管理员组文章数量: 1086019
In SSAS I have this simple scheme with a list of partners with their tags and the directory of tags. With this scheme, filtering by tags works on the principle "OR" - one of the tags selected by user in the directory can be present for a partner - the partner will be selected.
And how to do this: all selected tags (principle "AND") from the directory of tags must be present for a partner in the partner table and only in this case the partner will be selected.
In SSAS I have this simple scheme with a list of partners with their tags and the directory of tags. With this scheme, filtering by tags works on the principle "OR" - one of the tags selected by user in the directory can be present for a partner - the partner will be selected.
And how to do this: all selected tags (principle "AND") from the directory of tags must be present for a partner in the partner table and only in this case the partner will be selected.
Share Improve this question asked Mar 28 at 11:20 Дмитрий МыльчДмитрий Мыльч 293 bronze badges1 Answer
Reset to default 0Create a measure similar to this one:
FlagSlicerAND =
var slicerCount = IF(ISFILTERED(Tags[Tag]), COUNTROWS(ALLSELECTED('Tags')), 0)
var partnerTagCount = DISTINCTCOUNT(Partners[TagId])
return IF(slicerCount = 0 || slicerCount = partnerTagCount, 1, BLANK())
You can then either add this measure as a Visual Filter and set it to is not blank
, and/or use it in your other measures within, eg:
Total Partners =
SUMX(
DISTINCT(Partners[PartnerId]),
[FlagSlicerAND]
)
本文标签: powerbiFiltering data in SSAS based on quotANDquot not quotORquotStack Overflow
版权声明:本文标题:powerbi - Filtering data in SSAS based on "AND", not "OR" - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/p/1744040799a2523216.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论