Forum Discussion

JojoPBI's avatar
JojoPBI
New Member
2 years ago
Solved

PBI Report Builder - Multi-value parameter with DAX query

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.

 

2 Replies