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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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