Active form with dynamic entry rows

Post Reply
Marioler
Posts: 12
Joined: Tue Feb 26, 2013 10:08 am
OLAP Product: TM1
Version: PA local 2.0.8
Excel Version: 2016

Active form with dynamic entry rows

Post by Marioler »

Hi,

I am looking for a solution to create a websheet which dynamically increases the rows when entering data. For example if you have an active form with a numbered list (elements 1, 2, 3 etc) as the row dimension. The active form should only show one empty row when opening it. As soon as the user enters data in the first row and recalculates, a second empty row appears and so on. Can anyone provide some hints how this can be achieved with MDX?

Thanks!
Mario
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Active form with dynamic entry rows

Post by Wim Gielis »

You can create an extra measure with a formula that results in 1 or 0. If you feed this measure it can be used for your zero suppression in the active form.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
lotsaram
MVP
Posts: 3654
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Active form with dynamic entry rows

Post by lotsaram »

You don’t need a helper measure and rules/feeding. You can do it with MDX which is better IMO. Both methods will require a refresh to get the extra row to appear.

For MDX assuming you have a "data entry index" type dimension with placelolder measures named somethign like row1, row2, ...row99 then it is very easy to use MDX. All you need to do is use the HEAD function combined with a FILTER of the entry cube with the "data entry index" elements being empty. Usually I allow for 5 data entry rows at a time. not just one. Then if a user wants t do multiple data entry they don't need to refresh the page each time to get the next row. Just adjust the HEAD function to the number of rows you need and job done. (Note: for the HEAD fnction to work properly the element ordering and leveling in the dimension is important!)

E.g. something like

Code: Select all

{Head(
   {Filter(
      {[Data Entry Row].[All Rows].Children},
      [Entry Cube].([Version].[Forecast],[Data Entry Row].CurrentMember,[Entry Cube Measure].[Entry]) = ""
   )},
   5
)}
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Marioler
Posts: 12
Joined: Tue Feb 26, 2013 10:08 am
OLAP Product: TM1
Version: PA local 2.0.8
Excel Version: 2016

Re: Active form with dynamic entry rows

Post by Marioler »

Hi Wim and lotsaram,

Thanks a lot you for your answers.

@Wim: I knew I could solve it with an extra measure and rules. However I was sure it is somehow possible with MDX but I could not figure out how.

@lotsaram: Thank you for the code example, it works great! I had the wrong approach - I tried to solve it with Tail, Lead, NextMember functions. I could identify the last element with data using filter and the tail function. Then I tried to use Lead or NextMember and that is where I got stuck.

Thanks guys!
Mario
Wim Gielis
MVP
Posts: 3120
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Active form with dynamic entry rows

Post by Wim Gielis »

Thank you Lotsaram, I forget about this one. In the past I applied this too.
I added this information to my MDX page


01.png
01.png (111.4 KiB) Viewed 5343 times
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply