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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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