Forum Discussion
Set custom filter values as 'blank' or null
As an alternative, add another AdvancedFilter. You could also leave a comment on GitHub.
Thanks for reply,
You have suggest me use advance filter for handling null value but
Actually my implementation is like I have one custom filter which will I want apply to existing filter(not change any existing filter).
So that time whenever I will try following code it will not work
var basicFilter = {
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: table,
column: column
},
operator: 'In',
values: [value]
};
CurrentPage.getFilters().then(function (allTargetFilters) {
allTargetFilters.push(basicFilter);
CurrentPage.setFilters(allTargetFilters);
});
at time of setFilters it will throws error becuase
In that existing filter there is one basic filter
{
$schema: "http://powerbi.com/product/schema#basic",
target: {
table: table,
column: column
},
operator: 'NotIn',
values: [null]
};
so due to null value it will throws error,So my question is how to handle this null value such that it will not throws error.