Forum Discussion

WillVitale's avatar
WillVitale
Contributor
3 days ago

Dynamic Substitution Variable

Hello,

I'm working on writing a budget report for my company and we have these summary accounts that all start with "S_" and the parent name (i.e. ExtSales would be S_ExtSales). Is there a way I can use substitution variable on my column override, where I wouldn't have to go in and change every line to update the override?

Thanks,

Will

  • JimmyReaves's avatar
    JimmyReaves
    New Contributor

    Hard to say without seeing the cubeview, but you could try something like X#MyMember.Descendants.Where((Name Startswith S_) and (Name Contains |PovParent|))

    • WillVitale's avatar
      WillVitale
      Contributor

      Hey Jimmy,

      It's a pretty basic cube view on the row side. Just a UD1 and Account on the rows

      Right now I just hard coded all the overrides, but just wanted to see if there's a quicker dynamic way into doing this.

       

      Thanks,

      Will

      • T_Kress's avatar
        T_Kress
        Valued Contributor

        You could consider a dynamic U8 to possible transform the account name, perhaps something like the below.  Then use that U8# on the rows or columns as required.

        Dim AccountName As String = api.Pov.Account.Name
        
        Return api.Data.GetDataCell("A#S_" & AccountName& ":U8#None")