Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

How to get the big objects in custom visual? Primitive Value is unable to store more than 32767chars

How to get the big objects in custom visual? Primitive Value is unable to store more than 32767 characters.

I am using categoricalDataView.categories[infoFirstPosition].values[0] to get the data in custom visual, but its truncating the value to 32767 characters.

 

How we can overcome this?

  • Hi Anonymous,

    This is a limitation of the data model in Power BI - text columns cannot return more than 32,766 characters, so if you'ew creating measures from these columns they will already be truncated before they hit the custom visual's data view. PrimitiveValue itself doesn't have a limit and supports regular JS strings.

    If you wish to work around this in a custom visual, you will need to create a measure that combines multiple columns  of <= 32,766 characters and add that to the data view instead.

    Chris Webb (Power BI CAT) has a series of blog posts beginning here that show ways to model around these limits. The second post in the series is specifically what you'll be needing to do in your data model, but it's worth reading the whole series to understand the limitations you need to work with in Power BI.

    Regards,

    Daniel

1 Reply

  • dm-p's avatar
    dm-p
    Super User

    Hi Anonymous,

    This is a limitation of the data model in Power BI - text columns cannot return more than 32,766 characters, so if you'ew creating measures from these columns they will already be truncated before they hit the custom visual's data view. PrimitiveValue itself doesn't have a limit and supports regular JS strings.

    If you wish to work around this in a custom visual, you will need to create a measure that combines multiple columns  of <= 32,766 characters and add that to the data view instead.

    Chris Webb (Power BI CAT) has a series of blog posts beginning here that show ways to model around these limits. The second post in the series is specifically what you'll be needing to do in your data model, but it's worth reading the whole series to understand the limitations you need to work with in Power BI.

    Regards,

    Daniel