Forum Discussion

emantziaris's avatar
emantziaris
New Contributor
7 months ago

Cube Views: Taking Date from an Entity Dimension Text Field to Calculate Months to Date

I am trying to calculate months to date in a cube view column based on a date entered in a text field within Entity Dimension members. The text field would display in one of the columns on the cube view report, and the goal is to effectively subtract the current month from that date's month to derive a total months to date calculation in another column. Any thoughts on how I can do this? 

3 Replies

  • pranav46's avatar
    pranav46
    Contributor II

    Thinking to create a member with formula (Hope you have UD8 dim empty even if you dont have its okay to use dim based on your app) to read text value of entity, convert into date & display in Cubeview.

    In the cube view you need to bring a new member which will have formula and view member which is annotation type.

    Below example is hardcoded but I am reading an account and disapplying 01/01/25

     

    • emantziaris's avatar
      emantziaris
      New Contributor

      Thank you for the message! I am looking to convert this date to a calculation of months between the current date (today) and the date that is displayed in the text field. 

      • pranav46's avatar
        pranav46
        Contributor II

        Member formula you got to write a vb code. 

        Get the text value from Entity then you write your logic to calc month diff between current date to Text

        Dim EntityText As String = api.Account.Text(api.Pov.Entity.MemberId,1)