cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean Datatype

Rahul09
8 - Cloud Apps
8 - Cloud Apps

Hi,

I want one column in my pivot chart to have boolean datatype. Is there a way to convert it to Boolean format instead of Text?

Regards,

Rahul

2 REPLIES 2

Benji_PaldiTeam
11 - Data Pipeline
11 - Data Pipeline

Hi @Rahul09 ,

Assuming this one column is populated by a few text options (words) , is it possible to apply a JS script that detects those words and replaces them with True\False by any logic you apply.

With that in mind, it's a pretty easy and straightforward use case.

What if you want to replace words with numerical boolean (1\0) and perform a calculation upon it? 
What if you don't know which text will appear in this column and you want to apply complex logic for the boolean replace?

For these exact use cases, I would recommend looking at Sisense API documentation on pivot tables:
https://sisense.dev/reference/js/widget/pivot2.html
You can write a script using pivot APIs to apply complex logic.

Another option is to use Paldi Solutions Expandable Pivot - which exposes a customization API in the plugin and helps you to manipulate pretty much everything within your pivot table.
Let's take the image below as an example:

Benji_0-1677675147091.png

In this pivot, I have decided to add numbers, arrows, and brackets based on a logic that was easily customized with our customization API.

If this is something that interests you drop me a message or contact me via email and I would be happy to show you this capability and provide a free trial.

 
 
Paldi Solutions - Number #1 Sisense Plugins Developer 

Hi, 

Thanks for the solution, but in our use case we would have to keep our columns as text only. I can see sisense internally converts boolean datatype to text field when we import a table in the data model. Is there a way to handle it in the data model itself.

We are creating a 'table with aggregation' widget and want to use this widget in our UI tool.

Please find the image for your reference.