Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hello,
I'm currently trying to create a Power BI report, where the datasource is a Power BI Dashboard.
I want to have a multi-value parameter to filter on a specific field of my report.
Here is what I have done:
- Created a report level multi-value parameter
- Associated the report parameter with a query parameter within my dataset
- Declared a parameter within query designed
And then I'm using the following code:
EVALUATE SUMMARIZECOLUMNS('mytable'[col1], 'mytable'[col2],
TREATAS({@parameter},'mytable'[col1])
)
Issue is, when I'm executing the report, the filter only work if I'm putting a single value in the parameter.
As soon as I put more than one value, I'm getting an empty report.
I have also tried with the following code:
FILTER(
KEEPFILTERS(VALUES('mytable'[col1])),'mytable'[col1] IN {@parameter}))
But I'm getting the same behaviour.
What am I doing wrong?
Thanks for any help you can provide.
Solved! Go to Solution.
DAX does not natively support multivalue parameters so a workaround was added a few years ago. This article might help. https://blog.crossjoin.co.uk/2019/11/03/power-bi-report-builder-and-rscustomdaxfilter/
Thanks for your answer.
I was using this blog https://torchcloudconsulting.medium.com/power-bi-report-builder-parameterizing-dax-queries-59e95a12b... as a reference to try and create my query but seems like its solution is untested.
I ended up concatenating my multi-value parameter into a single string with pipes when passing it from the report to the query, and use PathContains function, but it's quite an ugly solution.
Would MDX be better to request a Power BI dataset from Report Builder? Seems like it's the only other solution as I'm trying to connect to a Databricks datasource, and this is only supported in Power BI but not Report Builder.
DAX does not natively support multivalue parameters so a workaround was added a few years ago. This article might help. https://blog.crossjoin.co.uk/2019/11/03/power-bi-report-builder-and-rscustomdaxfilter/
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
User | Count |
---|---|
20 | |
6 | |
4 | |
3 | |
2 |