Hey! Are you staying home? We are too. Still, we prepared a new product release for you!🚀

We hope it comes in handy for your business especially these days. Stay safe & pivot on!

Is there a way to display a string in cell?

Answered

I am wondering if there is way to aggregate the string in column and display it if it’s a unique value and display empty if it’s not unique?
Thanks,

1 answer

WebDataRocks Team WebDataRocks March 23, 2020

Hello, Allen,
 
Thank you for reaching out to us.
 
We would like to kindly inform you that only count and distinct count aggregations are available for the string data type.
 
However, as a workaround, we suggest using the customizeCell API call in order to achieve the desired functionality. For example, an approach for your case can be similar to the following:

  1. Specify the hierarchy named “Description_identifier” and place a unique description identifier in it. The hierarchy is going to be used as a wrapper for an actual description.

    {
    ...
    "Description_identifier": 0
    },
    {
    ...
    "Description_identifier": 1
    },
    ...
  2. Adjust the customizeCell method so it replaces the cell’s inner text with an appropriate description. E.g.:

    pivot.customizeCell(function customizeCellFunction(cell, data) {
    if (
    data.measure &&
    data.type != "header" &&
    data.measure.uniqueName == "Description_identifier"
    )
    cell.text = descriptions[data.value];
    });

 
Please check out an example we have prepared for you.
 
More information about customizeCell API provided by Flexmonster can be found following the link: customizeCell method.
 
We hope it works for you.
 
Do not hesitate to contact us in case of any additional questions on this point.
 
Best regards,
WebDataRocks Team

Please login or Register to Submit Answer