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.
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.
I’ve tried SELECT([BIRDIES],[PARES],[BOGEY],…)
Also tried SELECT(stats[BIRDIES], ([_THISROW].[PALYERS] = [PLAYERS]))
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:
SELECT(STATS[BIRDIES], ([PLAYERS] = [_THISROW].[PLAYERS]))
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?
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.