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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
pcad
New Member

How to pass null parameter in powerbi embed url filter query string?


I have a question about the powerbi embed url filter.  I'm trying to pass a null parameter to the following query string.

 

https://app.powerbi.com/reportEmbed?reportId=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaaa&autoAuth=true&fil...  in ('TypeA', 'TypeB') and Product/subcategory in ('SubtypeA', 'EMPTY')

 

The string is supposed to query [TypeA, SubtypeA] or [TypeB] in the same report.

 

I used the following parameters but it's only returning results for [TypeA, SubtypeA]
('SubtypeA', 'EMPTY')
('SubtypeA', 'NULL')
('SubtypeA', '')

 

How do I pass a null parameter to the query string so the results for [TypeB] are also returned?

 

Thanks

 

3 REPLIES 3
pcad
New Member

Following up to my previous post with the updated powerbi query string.


.https://app.powerbi.com/reportEmbed?reportId=aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaaa&autoAuth=true&fil... in ('TypeA', 'TypeB') and Product/subcategory in ('SubtypeA', 'EMPTY')

 

I want to be able to query using the 'in' operator with the conditional result  [Producy/category eq 'TypeB' and Product/suncategory eq NULL]

Hi @pcad ,

 

The parser doesn’t support '' null as a right hand side expression.

There is a workaround by replacing the blank values to text "Blank" in query editor, and you can try 

?filter=Producy/category in ('TypeA', 'TypeB') and Product/subcategory in ('SubtypeA', 'Blank')

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

The Blank placeholder in the query string wasn't working.  If I split the query then the results could be returned.

 

?filter=Producy/category in ('TypeB')
?filter=Producy/category in ('TypeA') and Product/subcategory in ('SubtypeA')

 

I want to be able to combine it into one query, so the end user can toggle the resulrs between TypeA and TypeB in the same report.

 

Thanks

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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