Forum Discussion
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&filter=Product/category 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
- pcadNew 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&filter=Product/category 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]
- V-lianl-msft
Community Support
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.- pcadNew Member
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