Get Free Trial

hide blank

Answered
Jimmy asked on October 13, 2021

Hello,
 
I’m trying to hide the “(blank)” from rows and columns, I’m using the filter object with exclude:

{
"uniqueName": "Child_desc",
"filter": {
"exclude": [
"Child_desc.[]"
]
}
}

But it doesn’t work and I’m getting the following warning/error:

  • “Error in predefined filter or members have not been loaded yet: “

JSfiddle: https://jsfiddle.net/vnda1m0L/
 
I have also tried using using localization with a weird result see attached img and JSfiddle: https://jsfiddle.net/La1n4wqk/
 
/Jimmy

Attachments:
Capture2.PNG

5 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster October 13, 2021

Hello, Jimmy,
 
Thank you for contacting us.
 
The correct way to filter out blank members from leaf nodes of the multilevel hierarchy is the following: "firstlevelhierarchy.[47_net income].[48_operating profit].[]". We have renamed “FirstLevel” to “FirstLevelHierarchy” to avoid confusion with the “FirstLevel” field present in your data set.
 
Also, please set the showEmptyValues property to false or remove it from configuration completely since false is the default.
 
Here is the JSFiddle we prepared for the demonstration: https://jsfiddle.net/flexmonster/08zh5ubx/.
This approach works both with and without the localization mentioned in your question since the internal presentation of such members remains the same.
 
In its turn, the console warning is due to the absence of empty members in other fields. Exclude filters you specify cannot find any empty members in corresponding hierarchies and, as a result, Flexmonster displays the warning.
 
Finally, please note that levels of the multilevel hierarchy should be added to slice differently. For example:

{
"uniqueName": "FirstlevelHierarchy",
"levelName": "Firstlevel"/"SecondLevel"/...
}

 
Please let us know if it works well for you.
 
Kind regards,
Illia

Public
Jimmy October 15, 2021

Hello Illia,
 
If “showEmptyValues” is set to false or removed how do I show empty rows then?
Example in this “54_Discounts” has it’s measure set to null and there for is not shown: https://jsfiddle.net/4ed9p5yw/ 
 
/Jimmy

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster October 18, 2021

Hello, Jimmy,
 
Thank you for your feedback.
 
We have noticed that setting showEmptyValues property to true leads to unexpected results when filtering multilevel hierarchies. We will research possible solutions for this issue and provide you with results ETA Nov 16.
 
Feel free to contact us if any other questions arise.
 
Regards,
Illia

Public
Jimmy November 26, 2021

Hello Illia,
 
There still some issues using the “showEmptyValues” with multilevel hierarchies when trying to use exclude.
 
showEmptyValues: false
exclude: “Firstlevel Hierarchy.[48_Operating Profit].[58_Operating Expenses].[]”
Works fine: https://jsfiddle.net/urmxcfLn/
 
 
showEmptyValues: true
exclude: “Firstlevel Hierarchy.[48_Operating Profit].[58_Operating Expenses].[]”
48_Operating Profit is now missing: https://jsfiddle.net/fsw8noj4/
 
 
showEmptyValues: true
Works but shows “(blank)”: https://jsfiddle.net/fxeut2ao/
 
/Jimmy

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster November 26, 2021

Hello, Jimmy,
 
Thank you for reporting this issue and for preparing JSFiddles.
 
We will investigate the problem and provide you with results ETA Dec 28.
 
Do not hesitate to contact us if other questions arise.
 
Kind regards,
Illia

Please login or Register to Submit Answer