Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
dewalds
Regular Visitor

Use / don't DAX filter/parameter based on the report parameter

Hi All,

I am struggling with a DAX filter/parameter.

Scenario: Our client has an external application from which the user will select certain parameters for a report. These will be passed to a PBI paginated report developed in Report Builder to generate. The source for this paginated report is a PBI shared dataset. This process works 100%.

Problem: If the user wants to select “all” companies for example, the word “all” or -1, needs to be passed to the report. If  the report receives the word “all” or -1, the filter part in the DAX code needs to be ignored. I am not familiar with DAX and had to stick the internet to find solutions, but no luck.

This is just one the DAX examples I’ve tried:

EVALUATE SUMMARIZECOLUMNS('M_Image'[ID], IF(RSCustomDaxFilter(@MRIImageID,EqualToCondition,[M_Image].[ID],Int64) = -1
,IGNORE(RSCustomDaxFilter(@MRIImageID,EqualToCondition,[M_Image].[ID],Int64)))

Basically – if the parameter passed to the report = -1, then do not use the filter, else use the filter.

Any ideas?

Many thanks!

1 REPLY 1
daXtreme
Solution Sage
Solution Sage

 

filter(
    Something,
    Something[OtherSomething] = "SomethingOther"
    || @YourVariable = "all"
)

or... you can UNION two SUMMARIZECOLUMNS queries where one of them will return an empty set depending on the value of a variable. There are many ways you can achieve what you want.

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.