Planning Analytics

 View Only
Expand all | Collapse all

TM1ELLIST ignores changes in underlying Datasource

  • 1.  TM1ELLIST ignores changes in underlying Datasource

    Posted Mon June 14, 2021 08:48 AM
    Edited by System Fri January 20, 2023 04:30 PM
    Hello everyone,

    we are using TM1ELLIST in our excel Reports. Unfortunately the do not update if the underlying data changes:

    We are using the following MDX (The last or condition sets the 0 to 1 if a toggle is set. This then ignores all other condition thereby returning all dimension elements).
    This MDX works perfectly fine, however if some data changes such that an element should be included in the result set, the last element is instead repeated. 
    e.g. with active filters:

    • GEN-0057
    Make some changes such that now also GEN-0058 and GEN-0059 should be returned what happens instead is:

    • GEN-0057
    • GEN-0057
    • GEN-0057

    If an element should be removed from the list, because the underlying data changes, the element is instead kept in the list, which should not be the case.

    I hope there is some way to fix this.
    {Union({[PlanningMeasure_Costcenter].[GEN-0057]},
         { 
        Filter({
                TM1DRILLDOWNMEMBER(
                    {[PlanningMeasure_Costcenter].[GEN-0057]}, ALL, Recursive
        )},
        [Costcenter].(
            [Costcenter].[2030200100 - UMLAGE BEREICHSREGIE], 
            [Planningcycle].[Prg. 03+/21], 
            [Variant].[Hauptvariante], 
            [Currency].[Local currency], 
            [Datatype].[Actual], 
            [Year].[Total Year], 
            [Month].[Total Month]
        ) <> 0
        OR
        [Costcenter].(
            [Costcenter].[2030200100 - UMLAGE BEREICHSREGIE], 
            [Planningcycle].[Prg. 03+/21], 
            [Variant].[Hauptvariante], 
            [Currency].[Local currency], 
            [Datatype].[Plan], 
            [Year].[Total Year], 
            [Month].[Total Month]
        ) <> 0
        OR
         [Costcenter].(
            [Costcenter].[2030200100 - UMLAGE BEREICHSREGIE], 
            [Planningcycle].[Current Planningcycle], 
            [Variant].[Hauptvariante], 
            [Currency].[Local currency], 
            [Datatype].[Total Datatype], 
            [Year].[2020], 
            [Month].[Total Month]
        ) <> 0
        OR
         [ReportingFullView].(
            [Costcenter_All].[2030200100 - UMLAGE BEREICHSREGIE],
            [Planningcycle].[Current Budget  2], 
            [Variant].[Hauptvariante],
            [CurrencyExchange].[EUR],
            [Datatype].[Total Datatype], 
            [Year].[2021], 
            [Month].[Total Month],
            [Country].[Total Country],
            [Company_Reporting].[Total Company],
            [MatrixOrganization].[Total MatrixOrganization],
            [isBAB].[Total (BAB & NOBAB)],
            [CM_Structure].[Total]
        ) <> 0
        OR 1 = 0
    )})}
    ​


    ------------------------------
    Constantin Budin
    ------------------------------
    #PlanningAnalyticswithWatson


  • 2.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Mon June 14, 2021 11:47 AM

    Which interface are you operating tm1ellist in?

    In Excel's case, try using alt-f9 in place of doing the other refresh options.  Let us know if the outcome is desirable.



    ------------------------------
    Ted Phillips
    ------------------------------



  • 3.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Tue June 15, 2021 03:02 AM
    Hello Ted,

    we are using PAfE with O365.

    While ALT+ F9 works it is not a usable solution for us. We need some way to clear the cache from VBA-Code.

    We have tried the following.
    • SendKeys "%{F9}" in VBA does not work. When sending ALT+F9 this way it appears to be ignored by PAfE
    • CognosOfficeAutomationObject.ClearCache() does not work
    • CognosOfficeAutomationObject.RefreshAllData does not work
    • Reporting.DynamicReports.RebuildActiveWorkbook does not work


    ------------------------------
    Constantin Budin
    ------------------------------



  • 4.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Tue June 15, 2021 08:38 AM
    next, try ONKEY_ALT_F9 or PurgeAF (global udf) macro depending on if you want to force calculation or not, respectively.

    ------------------------------
    Ted Phillips
    ------------------------------



  • 5.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Tue June 15, 2021 09:24 AM
    Hello Ted,

    thank you for your swift response. PurgeAF works great for us. However, we would still prefer it if TM1ELLIST would not cache the results.



    ------------------------------
    Constantin Budin
    ------------------------------



  • 6.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Fri October 08, 2021 10:34 AM
    I am having the same issue. Can you point me to more data on using PurgeAF? I'm not finding much online so far.

    ------------------------------
    Ivan Cepero
    ------------------------------



  • 7.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Fri October 08, 2021 10:43 AM
    Edited by System Fri January 20, 2023 04:18 PM
    PAfE seems to cache MDX results based on the MDX String. We implemented a hacky fix by addinga Filter and a random string to the MDX in VBA and changing the random string after each refresh. Something like this:

    FILTER(original_MDX, random_number > 0)

    The random number we generate is always > 0. Therefore the filter does not do much except forcing PAfE to acutally execute the MDX instead of using a cached result.

    ------------------------------
    Constantin Budin
    ------------------------------



  • 8.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Thu May 26, 2022 06:27 PM
    I'm having similar issues but with a much simpler use case.  In my case, the only argument I'm using is the first one (dimension), in which case it simply returns all elements.  Problem is that when an element is added to the dimension, the returned list does not reflect that.

    ------------------------------
    Mitchell Powell
    ------------------------------



  • 9.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Thu February 16, 2023 03:12 PM

    I'm having the exact same issue I believe. I am adding a leaf element to a dimension, so when I grab the all leaves subset, I was assuming it would populate (at least more than just the first time). I then tried the above filter around the MDX (displayed below), but that method unfortunately was not successful for me. Were you able to to find a more efficient solution by chance?

    What I tried: 

    =TM1ELLIST("tm1:Employee List",,,,,FILTER("TM1FILTERBYLEVEL([Employee List].[Employee List].MEMBERS , 0)", 1>0),,)

    Note: the bolded/underlined "1" was essentially a variable that was never the same, but always greater than 0.



    ------------------------------
    Peyton David
    ------------------------------



  • 10.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Wed February 22, 2023 12:47 PM

    is the invalidation occurring due to actions in the spreadsheet itself, or is it happening due to an external force? (chore, other users, etc)

    if the workflow of the spreadsheet is consistently driving the invalidation itself, ex: user clicks an action button, could place a purgeaf call in the shape-action association there (onclick).



    ------------------------------
    Ted Phillips
    IBM
    ------------------------------



  • 11.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Wed February 22, 2023 12:55 PM

    I have found a bit of a (clunky) workaround but at least it works. I have found that if I reference a subset in the formula (in my case with the subset name contained in a different cell), changing the subset causes the formula to refresh and pick up any new elements. In my case, I had a legitimate case for needing to reference different subsets, but I assume that even if that is not the case, some variation of this workaround could solve the problem.

     

    Mitchell Powell | CFO

    Integral 191 Peachtree Street NE, Suite 4100, Atlanta, Georgia 30303

    Direct: 404.224.5172 | Cell: 770-843-6478 | Email: mpowell@integral-online.com

    Website: http://www.integral-online.com | "Realizing the Full Potential of Urban Living"

    "Realizing the Full Potential of Urban Living"

     






  • 12.  RE: TM1ELLIST ignores changes in underlying Datasource

    IBM Champion
    Posted Wed February 22, 2023 12:56 PM

    Apologies for jumping in the middle here but was triggered by reading PurgeAF.

    @Ted Phillips - How do we as developers apply this and the DirtyAF function in PAfE?



    ------------------------------
    George Tonkin
    Business Partner
    MCI Consultants
    Johannesburg
    ------------------------------



  • 13.  RE: TM1ELLIST ignores changes in underlying Datasource

    Posted Wed February 22, 2023 01:34 PM

    no worries George. 

    it's not really that short of a topic though, unless already fairly well informed about the various classes of spreadsheet functions offered by the addin and the particulars involved with PA for Excel (see: the 'differences' article in the usage notes for Perspectives user's PA for Excel topic), the PA api offerings across time, and Excel itself.

    short answer is there are certain fundamental concepts underpinning the PA for Excel addin, a brief/partial summary:

    uses only the rest api, uses only mdx query paths, can not assume a high quality/close/intranet network link to the rest of PA, reporting content must be stable at-rest (which is to say that after a completion of a full calculation cycle, no content is inherently Excel-Dirty)

    those concepts drive the implementation outcomes in the addin. a basic example is that Custom Reporting functions must be run asynchronously (as compared to Perspectives which ran them synchronously backwards through the formula dependency graph using coercion) 

    another [more relevant] outcome (due to the difference in the api stacks) is that Dynamic Reports, TM1Set, TM1ELLIST use a special kind of computation to achieve their intended effect (whether that's matching historical api results/or user expectations). These items have special lifecycle needs that are balanced for reuse given they have a fairly high floor cost. Purge is a hook into the lifecycle of the natural system that effectively forces them to be recomputed, otherwise the addin will attempt to manage their lifecycle given the quality of invalidation signals it currently receives.

    'stable at rest' is really what drives the Dirty item. unlike Perspectives which essentially ran all content as continuously volatile, the addin will pursue a clean resting state for the reporting content. given this is entirely a spreadsheet specific system (and not subject to outside influence like the computational outcomes are) it's less likely for anyone to have a real need to interact with it (as the addin can & should be able to manage it fairly 'perfectly') the only scenario I could think of quickly would be some extremely exotic macro scenarios.



    ------------------------------
    Ted Phillips
    IBM
    ------------------------------



  • 14.  RE: TM1ELLIST ignores changes in underlying Datasource

    IBM Champion
    Posted Wed February 22, 2023 01:49 PM

    Thank you for the detailed feedback Ted. I have lots of homework to do…


    I try avoiding macro code as far as possible in favour of native functionality but seem to recall using DirtyAF as part of a procedure to refresh a sheet that had a TM1ElList on it that was not refreshing in the same manner as the OP's.

    Will have to run more tests before advocating anything though.



    ------------------------------
    George Tonkin
    Business Partner
    MCI Consultants
    Johannesburg
    ------------------------------