Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

Force all members of a hierarchy to be shown

Answered
Ilaria asked on June 25, 2020

Hi,
I would like to ask some tips on how to force all members of a hierarchy to be shown, for example I have a ‘Date’ field with members ‘Jan 2020’, ‘Feb 2020’,….. ‘Dec 2020’. I want these values to always be visible even if there are no corresponding data, for example, if I filter for some records and it happens that they don’t have data on Mar 2020, I don’t see Mar 2020. I looked by my self for workarounds but I didn’t find any acceptable solution.
For sure I have to set the option ‘showEmptyData’ to true; I have some limitations:

  • data set are usually very huge, so I can’t manually add ‘fake records’ foreach data in order to cover empty months
  • I can’t use for now the custom data source (I’m planning to implement it, but it will require me a lot of time and I need a faster solution). For now I can only use json DataSource.
  • The final user can modify the layout, so that the Date field can be in rows, or in columns
  • The final user can apply filters (also on the Date field and in this case only the selected month should be visible)

Do you have any suggestions? 
Thank you!
Ilaria

15 answers

Public
Vera Didenko Flexmonster June 25, 2020

Hello, Ilaria, 
 
Thank you for reaching out to us. 
 
For such cases, we kindly recommend using the showEmptyValues option.
 
Please see the following JSFiddle we have prepared for you: https://jsfiddle.net/flexmonster/2rch3tax/
In the example, when the showEmptyValues is set to true, all the date members are shown even if the filtered records don’t have data associated with a certain date member.
More details about the showEmptyValues option are available in the corresponding guide: https://www.flexmonster.com/api/options-object/
 
Please let us know if this would work fine for you.
 
Looking forward to your reply. 
 
Kind regards, 
Vera

Public
Ilaria June 29, 2020

First of all thank you for your quick answer!
Actually I’m not sure I can use ‘date string’ format, because I’m not using gregorian calendar, but a calendar based on the ‘fiscal year’. For such a calendar, for example, year starts on the first week containing September 1st, so that 2020 starts on 31/08/2019. For that reason I implemented by own hierarchy in order to aggregate dates.
Consider the dates
– 24/08/2019
– 31/08/2019
– 07/09/2019
Year 2020 starts on 31/08/2019 so:
– 24/08/2019 correspond to the last week of 2019, the hierarchy is Year 2019, Month 12, Week 52
– 31/08/2019 correspond to the first week of 2020, the hierarchy is Year 2020, Month 01, Week 01
– 07/09/2019 correspond to the second week of 2020, the hierarchy is Year 2020, Month 01, Week 02.
Here is a JSFiddle. If you filter for ‘apple’ the hierarchy for 2019 is empty.
How can I get the Week 52 always visible?
Thank you!

Public
Vera Didenko Flexmonster June 30, 2020

Hello, Ilaria,
 
Thank you for your reply and for providing further details.
 
Our team will provide an update so that all hierarchy levels are also visible if the showEmptyValues option is enabled.
This will be available in the minor release version with the ETA 27th of July.
 
Please let us know if this would work for you.
 
Kind regards, 
Vera

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster July 28, 2020

Hi Ilaria,
 
We are happy to inform you that the issue with drilling down hierarchy levels when showEmptyValues: true option is enabled was fixed.
 
This is available in the 2.8.12 version of Flexmonster: https://www.flexmonster.com/release-notes/
 
You are welcome to update the component. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/
 
Please let us know if you have any questions we can assist you with.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster August 6, 2020

Hi Ilaria,
 
How are you?
 
We were wondering if you’ve had a chance to check out the fix we’ve mentioned in our previous response. Was it helpful, or is there still anything we can help you with?
 
Please let us know what you think.
 
Best regards,
Mykhailo

Public
Ilaria October 15, 2020

Hi,
the fix you mentioned in your previous response was helpful: the JSFiddle sample works, indeed.
But I’ve another case for which the “showEmptyValue” option doesn’t behave as I expect.
I have 3 record in my dataSource (month in columns, aggregated by year)

  • apple in Dec2019
  • orange and pear in Jan2020

If I set a filter excluding ‘apple’
What I expect:

  • Column 2019 (empty) with child Dec2019 (empty)
  • Column 2020 (TotValue = 2) with child Jan2020.

Instead I obtain:

  • Column 2019 (empty) but not expandible
  • Column 2020 (TotValue = 2) with two children: Dec2019 (empty) and Jan2020 (TotValue = 2).

Here a JSFiddle.
Thank you in advance!
Kind regards,
Ilaria

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster October 16, 2020

Hi Ilaria,
 
Thank you for writing to us.
 
The described behavior does look strange – we will take a look at this and return to you ETA Nov 16th.
 
Please let us know if there’s anything else we can help you with in the meantime.
 
Regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster November 17, 2020

Hi Ilaria,
 
We are glad to inform you that the issue with expanding hierarchies when the showEmptyValues option is enabled was fixed.
 
This is provided in the 2.8.20 version of Flexmonster: https://www.flexmonster.com/release-notes/.
 
You are welcome to update the component. Here is our updating to the latest version guide for assistance: https://www.flexmonster.com/doc/updating-to-the-latest-version/.
 
Please let us know if everything works well for you.
 
Best regards,
Mykhailo

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster November 24, 2020

Hi Ilaria,
 
Hope you’re doing well!
 
Just checking in to ask if you’ve had a chance to test the latest Flexmonster update. Has the issue been resolved on your side?
 
We would be happy to hear your feedback.
 
Regards,
Mykhailo

Public
Ilaria January 8, 2021

Sorry for my late reply, 
but with the last version (2.8.23) the problem seems not completely fixed.
the same fiddle posted before (JSFiddle) is not working properly:
If I set a filter excluding ‘apple’
What I expect:

  • Column 2019 (empty) with child Dec2019 (empty) 
  • Column 2020 with child Jan2020.

Instead I obtain:

  • Column 2019 with two children Dec2019 and Jan2020
  • Column 2020 with two children Dec2019 and Jan2020

Could you please verify?
Thank you in advance!
Best regards,
Ilaria

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 11, 2021

Hi Ilaria,
 
Thank you for your response.
 
We understand that in some situations, it would be more convenient to only display the December column under the year 2019 since it is the only month of that year containing any entries.
 
Nevertheless, achieving this behavior with showEmptyValues: true would be problematic due to particular limitations and specificities of the option in question.
 
What we can suggest instead is to consider renaming the months (e.g., “Dec2019” to “Dec”) in order to avoid confusion where, for example, Dec2019 exists under the year 2020.
 
Please let us know if there is anything else we can help you with in the meantime.
 
Kind regards,
Mykhailo

Public
Ilaria January 14, 2021

Hi Mykhailo,
Thank you for your reply,
unfortunately for us your suggestion about change the name of the labels doesn’t works in other scenarios like week columns (JSFiddle Weeks), the point is it’s possible to visualize only the empty columns of the data set? The answer would seem no.
What are the chances of having this function in the next future? is it in you current roadmap?
Alternatively the hierarchy fields could be helpful because it maintains consistency of the data set (JSFiddle hierarchy) but we have a question about to select a subset of the hierarchy fields in our JsFiddle example, how can we aggregate by years and months? (so hiding half-year level)
Best regards,
Ilaria

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster January 14, 2021

Hi Ilaria,
 
Due to the previously mentioned technical limitations, it seems like we won’t be able to introduce this functionality in the near future, nor can we provide you with an ETA. Nevertheless, we’ve added this request to our backlog and will review it once the circumstances allow it.
 
Speaking of your second JSFiddle sample, it seems like everything is working as you need it once you organize the “Year” and the “Month” fields under one multi-level hierarchy.
 
With that in mind, is there any chance you can remove the “HalfYear” from the “Time” hierarchy and keep it as a separate field? Alternatively, you could also create two different time hierarchies: one including the “HalfYear” field and one without it.
 
Please let us know if you find the suggestions above helpful.
 
Looking forward to your response.
 
Regards,
Mykhailo

Public
Ilaria 2 days ago

Hi Mykhailo,
Thank you for your reply,
About the second jsFiddle sample unfortunately your suggestions doesn’t help us,
we can’t separate the fields in our project and the idea to create different hierarchies
works well only with a low number of fields, in our project we have dozens of fields.
What are the chances of having a solution of this problem in the next future?
thanks for help

Best regards,
Ilaria

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster 1 day ago

Hi Ilaria,
 
I am afraid we won’t be able to introduce the requested behavior into Flexmonster anytime soon. With the current architecture of the component, efficiently integrating this behavior would be very complex and require a lot of resources.
 
That being said, this feature is not yet included in our development plans for future releases. Still, as I’ve mentioned before, your request has been forwarded to our R&D team and will be taken into account when discussing future Flexmonster improvements. 
 
Please let us know if you have any other questions we can help you with.
 
Regards,
Mykhailo

Please login or Register to Submit Answer