Skip to main content
Newcomer
August 3, 2023

Can I use XFMemberProperty in a Cube Cell Format field?

  • August 3, 2023
  • 1 reply
  • 0 views

Hi all, 

I wonder if I can use the following code in a Cube Cell Format. 

       "XFMemberProperty (DimType=Account, Member=|MFAccount|, Property=AccountType)"

The idea is to flip value sign in case AccountType is 'Expense'. 

-----------------------------------------------------------------------------------------------------------------------------  

If ('XFMemberProperty(DimType=Account, Member=[RowE1MemberName] , Property=AccountType)= 'Expense') Then
               FlipSign = True
End If

-----------------------------------------------------------------------------------------------------------------------------  

    1 reply

    Contributor
    August 3, 2023

    Hi Rafael,

    I don't think you can do that probably you could try using an XFBR rule, but the challenge is passing the account from cell POV to the rule. I'll give it a shot, but if you can share how you've built your CV, I can help with a better solution.

     

    Newcomer
    August 3, 2023

    Hi Omkar, 

    this is the thing. 

    I have a column set with 3 members (Actual, Budget, Var_Scen),

    where Variance is calculated as follows:

    If AccountType = "Expense" then  

    Variance = (Actual - Budget)

    else 

    Variance = (Budget - Actual)

    The goal is implement a Guided_Reporting ColumnSet, so I don't know the accounts in the RowSet.

     

    RafaelVidal_0-1691093761679.png

    Thanks, 

    Rafael Vidal 

     

     

     

    aricgresko
    Veteran
    August 4, 2023

    Raphael - to answer your most recent comment, try using the BWDiff member filter to calculate the variance, rather than trying to flip the sign on the expense accounts.  BWDiff will inherently calculate the variance based on account type (revenue, expense, etc.). 

    aricgresko_0-1691151157436.png