Percentage Datatype in Data Designer

Related products: None

Hi Team,

In Data designer for calculating % of active users the output field is just showing the value ex: 87 but not 87%.
The client wants that widget to show the % symbol in widget.
That is not possible via DD because we can have only numeric expressions as out put in DD and we can't exclusively mention that to be percentage.

 

 

@baji_bathula hope you are looking at the percentage type filed?


@sai_ram yes we are looking for a percentage type filed in final output task.


Nice Catch @baji_bathula. Thanks for bringing this up.

 

Basically, when we create a formula in Data Designer, its a number data type. If there were an opportunity to select percentage or currency data type, the visualizations would follow the currency or percentage formatting. Is this the only place where you notice this?


Came across this recently. 

 

Until this is offered a possible workaround I’ve came up with was to store all possible percentage values in a separate table with their numerical counter part. i.e.

Numerical     Percentage

100                 100%

99                    99%

etc                   etc

 

Then fetch this data and merge it into your final dataset on the numerical value, giving you the percentage field needed. Not ideal but gets you there.

 

Also note, this only solved for widgets for me, not individual rows for some reason.


@Wayne thank you for posting the workaround here.


@rakesh Yes, you are correct. We are excepting to output column type would be currency or percentage type in DD.


+1, we would love to have Percentage types in Data Designer. 


Hi @cmultanen, thank you for your post. Rest assured this is on the roadmap, and we shall post here once we have an update for you. 


As Cornelia said, we have added this to our roadmap. Do upvote this if you want us to pick it up earlier.


@rakesh any update on where this stands?


I figured out a workaround! (It is convoluted, but does the job!)

  1. Calculate your percentage field and multiply it by 100 (so that .613 will instead be stored as 61.3)
    1. [numerator] / [denominator] * 100
    2. Set your decimal places as desired
  2. Create new transform step
  3. Save your percentage field as a string using the To String formula. I recommend defaulting in 999999 when NULL (will handle in later steps, but 999999 will definitely jump out as incorrect if it sneaks through)
    1. To String([percentage],[DEFAULT VALUE])
    2. Note, Gainsight does not allow you to skip the default value parameter or put in a space.
  4. Hard-code a percent symbol into a field using a case field that always returns ‘%’
  5. Create new transform step
  6. Concatenate your percentage stored as a string with your hard-coded percent symbol
    1. Concat([PERCENTAGE STORED AS STRING],[HARD-CODED PERCENT SYMBOL])
    2. Note, when you preview the data Gainsight will not respect the number of decimal places you configured when creating the original percentage, but it outputs correctly when the dataset properly runs
  7. If your percentage field can return NULL for your dataset, make sure to also do this step: create a case statement to handle when your default value from step #3 is returned.
    1. Case 1 [PERCENTAGE STORED AS STRING] = 999999 (or whatever your default value is) THEN n/a (or whatever you’d like to show as your default text. DEFAULT [PERCENTAGE WITH PERCENT SYMBOL]

 

Here are the same steps with some values (A/B) to demonstrate the flow:

  1. PERCENTAGE-A = 61.3, PERCENTAGE-B = NULL
  2. --
  3. PERCENTAGE STORED AS STRING-A = 61.3, PERCENTAGE STORED AS STRING-B = 999999
  4. HARD-CODED PERCENT SYMBOL-A = %, HARD-CODED PERCENT SYMBOL-B = %
  5. --
  6. PERCENTAGE WITH PERCENT SYMBOL-A = 61.3%, PERCENTAGE WITH PERCENT SYMBOL-B = 999999%
  7. CASE STATEMENT PERCENTAGE-A = 61.3%, CASE STATEMENT PERCENTAGE-B = n/a