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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
alfred1
Frequent Visitor

set hierarchy filters with API

Hi,

 

I have a problem when using the js API to set filters in a hierarchy.

 

first thing I tried was setting a basic filter with the target set as hierarchy; the filter seems to be set because the report refreshes - but the response from getFilters returns an error telling me that the filter need an operator ('In/Not').  also im not sure this will resolve the next problem i encountered:

 

second thing i tried was settings a basic filter with the column as target and using the In operator; this works, but without the ability to set basic filters to include (Blank) values it is useless for hierarchies. e.g: 

 

setting both "administrativt material och utrustning" and "byggentreprenörer" will not work because 

at level 6 we have "Utrustning" in the "administrativt material och utrustning"-branch, but in the "byggentreprenörer"-branch we have a (Blank) at that level. but unfortunetaly we cant include (Blank) in the basic filter so the whole branch will be filtered out.

 

 

Capture.PNG

 

 

using advances filters will probably not work (as far as i understand, and tested) because I need to use the In operator with multiple values. 

 

is there any plans to make us able to include blank values in basic filters? or does someone have another idea on how to solve this? 

 

i hope I was clear enough 🙂

 

 

 

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @alfred1,

 

According to the wiki/Filters, it seems hard to build a hierarchy filter. Maybe you can try the operator "All" which can bring back all the values including blanks.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Unfortunately this will not work, @v-jiascu-msft

 

thanks anyway

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.