Is it possible to return a string with CubeView GetDataCell Function

Sridhar_M
Contributor

Hi everyone,

We have a cube view with three rows structured as follows:

Row1: E#Parent1.Children:U1#Member1

Row2: E#Parent1.Children:U1#Member2

Row3: Variance between two columns.

To handle this, I created an XFBR that dynamically generates a string based on the number of children for the user-selected parent (Parent1 as a parameter). The generated string will look something like this:

GetDataCell(CVR(Row1,1) - CVR(Row2,1)), GetDataCell(CVR(Row1,2) - CVR(Row2,2)), and so on.

We have three columns in the same cube view: two data columns and one text column. The text column uses the U8 member as a dynamic calc member, which returns a string.

In the variance row for the text column, I'm getting a blank instead of a string. I’ve tried different row override methods using XFBR and XFCell, but haven’t had any success. I suspect that GetDataCell might be causing the issue, but I wanted to ask for some guidance. Has anyone encountered this problem, or does anyone have any suggestions? Your input would be greatly appreciated.

Regards

Sridhar 

6 REPLIES 6

JackLacava
Honored Contributor

The real issue here is that your UD8 is returning a string and you think it should be a number. If it's supposed to be a number it should return a number. You can't subtract strings.

Hi @JackLacava 

Thank you for your response. Yes, I need to return a string, which is why I'm using row overrides to avoid passing the GetDataCell function that's being fetched from the XFBR.

TheJonG
Contributor II

Hi there - a screenshot of the Cube View may be helpful to get a clear picture of what you are trying to do but my first thought is that when you are trying to show text in a Cube View cell you need to use one of the View members that allows text e.g. Annotation, Assumptions, Footnote, etc. 

Hi @TheJonG 

Thank you for the feedback. Below is a sample export of the cube view, and yes, I'm using V#Annotation to retrieve the string. The sections highlighted in green should display the same Entity Groups as in Actual and Forecast.

Sridhar_M_0-1726605186759.png

Not totally sure but I do think the GetDataCell is messing it up. Instead of using a GetDataCell with the CVR functions you could use a UD8 dynamic calc instead and replicate the logic there. Then you can do an If Statement on one the POV members of the third column and have it return the text for that column only. If this isn't clear, paste in a screenshot of the third column member filter and I can try to give you an example script.

Hi @TheJonG 

Here’s a screenshot of the Member filter for the text column, where UD8 is a dynamic member that retrieves the Entity group from the text property based on the Entity point of view.

Sridhar_M_0-1726691985502.png

I already attempted to add a U8 Member to replicate the GetDataCell logic, but I'm having trouble accessing the user-selected U1 members for Row1 and Row2 (U1#Member1 and U1#Member2, which are also user selections). Is there a way to retrieve those values in the Member formula? If so, could you please assist me with that?