Adding a chart on detail view

If I have a customer and orders tables, how can I add one or more charts to the customer detail view that will show data from the orders table for same customer?

To the table where Customer information is coming from, add a Virtual Column with a SELECT(…) expression to populate which data you want from any desired table which will create a LIST type virtual column. Then create a REF type Chart View associated with this Virtual Column. Edit Customer Detail view and arrange the column order including this virtual column. Your chart(s) will be shown as an inline view in Customer Detail View.


Hi, I’m new in appsheet and I can’t get the SELECT() expression to work. I need to make a pie chart with percent values from 6 diferent columns. What I’m trying to show is a golf player stroke statistic. When you click the players name the chart have to show the storke distribution. But I cant get it to work.


Hi @PGT_GOLF_TOUR! Welcome to the forum!

SELECT expressions can be tricky until you get used to them.

It will be easier for people here to help you if you can give us the table and column names your expression needs to access and then show us the expression you’ve tried. Once we can determine that the expression is good, if that doesn’t solve the problem we can go to the next step.

1 Like

Thank you Kirk for your answer,

The table name is STATS, ande columns the the expression need to acces are BIRDIES, PARES, BOGEY, 2 BOGEY, 3 BOGEY and 4+ BOGEY.



Thabk you Steve,

I’ve read that before I post my question. Sorry but I don’t get it how to get the data for the chart.

Thanks! I think that @Steve posted the link to the SELECT() article because your expressions don’t follow the format described in that article. I’m not sure what you were trying to do with the first expression but in regard to the second one, here’s a similar one in the SELECT() article:

SELECT(Orders[Order ID], ([Customer] = [_THISROW].[Customer]))

We can just modify this with your table and column names:


This is quite similar to what you posted but you seem to have had a spelling mistake. When you use this expression, do you get an error?

1 Like

By the way, this expression will produce a “list” of the information in the BIRDIES column for the player of this row. You said you are interested in making a pie chart. The select expression alone won’t do that. I haven’t made a chart in a while but I think you’ll need to first figure out how to calculate the values that will be displayed in the chart and then, when that’s done, you can go to the next step of publishing the data in pie chart format. To do this, you might what to use what are called “virtual columns” to prepare your data.

1 Like

Yes that’s right, and that is what I’m trying to do. I first read what @LeventK had explained in this post, I created the virtaul column, and he suggest to use a SELECT() expression to populate the data I need from the table. Well I’m stuck there.

Thank you for your responses, and sorry for my ignorance in this matter.

What would you like to have in your pie chart? Perhaps if we start with the result you are aiming for, we can work backwards

By the way,I think that the select expression could be used to make a pie chart where we show what portion of all of the birdies the person of this record got. But, I doubt that’s what you want to do. :slight_smile:

Kirk, thank you for your reply.

What I’m trying to do is to show in a chart, how many birdies, pars, bogeys, etc made each player. I have a table named STATS that has all the players in the tournament, with diferent information, and the last 7 columns (percent type) are the ones to use for the chart.

In that case, I think the


should be useful to you. If you put it inside a COUNT() expression, you can count the number of birdies that player got:


I would recommend that this be in a virtual column. Then make similar virtual columns for every type of data (pars, bogeys, etc.). Then, the final task will be to put them together in a graph. Before the graph, though, you’ll need to test to make sure that each vitural column is spitting out the correct calculation.

Hi Levent, i’m having trouble makeing this work, i’ve followed the steps you gave and the graph isn’t shown.

Could you tell me what am I doing wrong?


You can’t see it as an inline view unless you don’t retrieve the key column values with the SELECT. I don’t know what’s your expression in that VC, but I suspect your are collecting some kinda numbers

1 Like

Thanks Levent, I did what you told. But now the graph is taking the whole detail view.

The graph should appear at the bottom of the Detail view

I deleted the graph ref view to show how it should be.
This view should be looking like this:

And the detail view like this:

The graph should be at the bottom of the detail view where those Key numbers appear.

Have you created a new REF type CHART VIEW? How have you arranged that chart view?

Yes, a new REF type CHART VIEW:

It is appearing in the inline view but I added the column in the column order of the detail view.