Jump to content

Simple Pie-Chart with two values from a Row

Benjamin S
Go to solution Solved by Fredrik Rosell,

Recommended Posts


I want to create a simple Pie-Chart from the last row in a table.

The table exemplary looks like this:

Table.PNG.0849d95881179d96937af45aea0fc8d8.PNGThe desired chart shall look like this:


I need the table to be in this format in tibco, so transposing it for this pie chart would require loading the data twice.

Isn't there a simple to create a custom expression for the color property like in this dummy code:



Or is there any other way to achieve this?

Thanks a lot!

Link to comment
Share on other sites


The pie chart is column-based for for this use case, creating an additional data table based on the first one and transposing it, would be a good option. Is there a particular reason you want to avoid that? Note that you could e.g. put only that single last row of data in the new table, by using a "Filter Rows" transformation (I used DenseRank([Date],"desc")=1 to get the last Date/row in my example below) . See example below where I created Data Table(2) based on the original data from Data Table 1, using a Filter Rows and Unpivot transformation to reformat it, which I then used in the pie chart.


Link to comment
Share on other sites

Hello @Fredrik Rosell​ !

Thank you very much for your fast response.

Adding in an additional data source (so in theory a duplicate of the history data source, just pivoting it) seems like an overkill to just get two values for me. It might affect loading times since it has to load the same table twice, if I am correct. This is why I would like to avoid it.

I was also wondering if I could add in an additional column as follows:

If([Column1]=Min([Column1]),Last([A]) ,If([Column1]=Max([Column1]),First([A]),Null))

By this I would like to have an column which contains only two values, the rest would be empty. This should be a valid input for the pie chart. However, Last([A]) and First([A]) are not working since they are row-related and not considering the entire column :/

I also tried Min([A]) Over [Column1] but it also seems that this is only considering the [A] value from that row.

Link to comment
Share on other sites

Ah Okay, well that sounds reasonable thought. Maybe I missed that possibility in the courses, I am still an amateur here.

I am currently reading the data via "+" -> "Browse local file" -> Select excel file.

This shows the data connection between excel file and tibco data table.

How can I create another branch from this .xlsx file to a second data table?

Or is Tibco automatically realizing that two datatables are based on the same source and then only loading once?

Or is IronPython'ing required?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...