Skip to main content
Newcomer
Nov 11, 2024 9:41 PM UTC

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

Member
Nov 12, 2024 3:19 AM UTC

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

pranav46_1-1731381405928.png

 

Newcomer
Nov 12, 2024 3:27 PM UTC

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. 

Member
Nov 13, 2024 1:37 PM UTC

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)