Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am having trouble converting my multi-select DAX into Report Builder:
// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({"07072021-047", "07132021-013"}, 'IPAR'[Referral_ID])
VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('factCase'[OStatus_DT])),
AND(
'factCase'[OStatus_DT] >= @p_sDate,
'factCase'[OStatus_DT] < @p_eDate
)
)
I am very comfortable in Visual Studio 2019. But the examples I have seen for multi-select are for SQL. My multi-select, in this case, has available values sourced from a query.
https://mwtn-my.sharepoint.com/:u:/g/personal/dkernen_mwtn_org/EU7Oryj-XgtDm_KHFNCWZm0B7DXNeH9uOI8qt...
Thank you so much for any help you can provide!
@ReportServer @Parameters
Solved! Go to Solution.
FYI, The post is for "Report Server" group.
Based on your file, you configured the "p_Referral" as multiple values.
1) you need to add the parameter to the dataset as below.
<QueryParameter Name="Referral">
<Value>=Join(Parameters!p_Referral.Value, "|")</Value>
</QueryParameter>
2) Change your DAX as below, in the dataset
VAR __DS0FilterTable =
TREATAS({"07072021-047", "07132021-013"}, 'IPAR'[Referral_ID])
as
VAR __DS0FilterTable =
// TREATAS({"07072021-047", "07132021-013"}, 'IPAR'[Referral_ID])
FILTER( VALUES('IPAR'[Referral_ID]), PATHCONTAINS (@Referral, 'IPAR'[Referral_ID]))
3) Optional: DAX generated by Power BI is typically huge. you can tweak it (or reduce it) to your needs.
Hope this helps!
@sevenhills Thank you so, so much! I struggled with this for so long before receiving your solution. I apologize for using the wong forum and I will work to tighten-up the DAX.
FYI, The post is for "Report Server" group.
Based on your file, you configured the "p_Referral" as multiple values.
1) you need to add the parameter to the dataset as below.
<QueryParameter Name="Referral">
<Value>=Join(Parameters!p_Referral.Value, "|")</Value>
</QueryParameter>
2) Change your DAX as below, in the dataset
VAR __DS0FilterTable =
TREATAS({"07072021-047", "07132021-013"}, 'IPAR'[Referral_ID])
as
VAR __DS0FilterTable =
// TREATAS({"07072021-047", "07132021-013"}, 'IPAR'[Referral_ID])
FILTER( VALUES('IPAR'[Referral_ID]), PATHCONTAINS (@Referral, 'IPAR'[Referral_ID]))
3) Optional: DAX generated by Power BI is typically huge. you can tweak it (or reduce it) to your needs.
Hope this helps!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |