admin管理员组文章数量:1122846
I have the following requirement:
Design an .rdl report (multipage) that is hosted in Power BI. The report must have several interactive filters enabled that a user will select to filter out only required information.
I was able to implement one filter with the following DAX expression:
DEFINE VAR __DS0Core =
FILTER( SUMMARIZE(
'User List',
'User List'[Description],
'User List'[Email],
'User List'[FacilityName],
'User List'[FirstName],
'User List'[LastName],
'User List'[SiteName],
'User List'[Username],
'User List'[LastLogin]
),
PATHCONTAINS(@Program, 'User List'[Description])
)
EVALUATE
__DS0Core
ORDER BY
'User List'[Description],
'User List'[Email],
'User List'[FacilityName],
'User List'[FirstName],
'User List'[LastName],
'User List'[SiteName],
'User List'[Username],
'User List'[LastLogin]
Where @Program is a parameter defined on the report
I am stuck now because it seems that PATHCONTAINS doesn't take more than one argument. I need to implement 3 more filters: FacilityName, SiteName, and LastLogin
I just started leaning DAX 2 days ago and seems that my t-SQL experience isn't easily transferable to DAX. Any help would be appreciated.
I have the following requirement:
Design an .rdl report (multipage) that is hosted in Power BI. The report must have several interactive filters enabled that a user will select to filter out only required information.
I was able to implement one filter with the following DAX expression:
DEFINE VAR __DS0Core =
FILTER( SUMMARIZE(
'User List',
'User List'[Description],
'User List'[Email],
'User List'[FacilityName],
'User List'[FirstName],
'User List'[LastName],
'User List'[SiteName],
'User List'[Username],
'User List'[LastLogin]
),
PATHCONTAINS(@Program, 'User List'[Description])
)
EVALUATE
__DS0Core
ORDER BY
'User List'[Description],
'User List'[Email],
'User List'[FacilityName],
'User List'[FirstName],
'User List'[LastName],
'User List'[SiteName],
'User List'[Username],
'User List'[LastLogin]
Where @Program is a parameter defined on the report
I am stuck now because it seems that PATHCONTAINS doesn't take more than one argument. I need to implement 3 more filters: FacilityName, SiteName, and LastLogin
I just started leaning DAX 2 days ago and seems that my t-SQL experience isn't easily transferable to DAX. Any help would be appreciated.
Share Improve this question edited Nov 21, 2024 at 19:16 itisinteresting asked Nov 21, 2024 at 19:07 itisinterestingitisinteresting 1472 silver badges12 bronze badges1 Answer
Reset to default 0DAX demystified. ;) I used && to provide multiple path conditions.
DEFINE VAR __DS0Core =
FILTER( SUMMARIZE(
'User List',
'User List'[Description],
'User List'[Email],
'User List'[FacilityName],
'User List'[FirstName],
'User List'[LastName],
'User List'[SiteName],
'User List'[Username],
'User List'[LastLogin]
),
(PATHCONTAINS(@Program, 'User List'[Description])) &&
(PATHCONTAINS(@FacilityName, 'User List'[FacilityName])) &&
(PATHCONTAINS(@SiteName, 'User List'[SiteName])) &&
(PATHCONTAINS(@LastLogin, 'User List'[LastLogin]))
)
EVALUATE
__DS0Core
ORDER BY
'User List'[Description],
'User List'[Email],
'User List'[FacilityName],
'User List'[FirstName],
'User List'[LastName],
'User List'[SiteName],
'User List'[Username],
'User List'[LastLogin]
本文标签:
版权声明:本文标题:powerbi desktop - How to use multiple filters & parameters in a DAX expression for Power BI paginated report - Stack Ove 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307852a1933454.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论