Display name in chart view not displaying referenced column values

Hi there, 

I have a table that includes the top countries with respective percentages for each entry (row). The layout is country name, % of that country, so:

Column A: name
Column B: Top 1
Column C: Top 1%
Column D  : Top 2
Column E: Top 2%
Column F: Top 3
Column G: Top 3%
So e.g. one row has USA - 20% - UK - 15% - Japan - 12% (label - value - label - value - label - value).
I've created a chart view that is filtered only on the selected row with the columns Top 1%, Top 2%, Top 3% with a col series chart type.
By default, the display name of each entry is the column name (so "Top 1%" etc). What I want to achive is to change the display name of "Top 1%" to the actual value of "Top 1" (e.g. "USA"). 
When setting the display name of the respective chart column to a fixed value, e.g. "Test xyz" it works (it displays "Test xyz"). However, it does not work when referencing the value of another column, e.g. [Top 1].
In the expression assistant, the test functionality shows that the values are actually returned (so, the expression is correct). But it doesn't work in the chart. 

Any ideas how I can achive this ? 

Solved Solved
0 6 625
1 ACCEPTED SOLUTION

I can see 2 options for you.

 

1. Create a new grouped action. Add your existing LINKTOFILTEREDVIEW action as the last action in the group, and replace it's position in your app with the new grouped action. As a first action in the group, set the value of a new [flag] column to NOW(). This way, you can lookup the selected/flagged record's country value in your Display Name expression with: LOOKUP( MAXROW())

 

2. Adjust your data structure as I first mentioned. You'd need your new structure to look like this:

unique-key common_identifier number country value
  a 1 United States 29
  a 2 United Kingdom 15
  a 3 Mexico 3
  b 1 Brazil 15
  b 2 United States 1
  b 3 Portugal 0.3

In this new table structure, you can set the [country] column as the Label, then it will be what appears by default on the chart for each bar.

View solution in original post

6 REPLIES 6

You would need to restructure your data to match what you need the chart to display. If you can be more clear about how your current structure is, and exactly how you want the chart to display, that would help. Use screenshots and/or mockups.

Hello Marc, thanks for the reply. The chart itself displays correctly, it is just the label that doesn't work.

This is the google Sheet 

Google Sheet.png

This is the Appsheet view settings:

Appsheet view 1.png

The chart displays correctly, but the display name is the column name:

chart_1.png

However, the display name of each column is set to show the respective value of the neighboring label columns, e.g.:

display name_1.png

The test functionality in the expression assistant also shows that the returned value is correct,

expression test.png

but it won't show in the chart itself. When I set the display name to a fixed value, e.g. "Test ABC", it does:

display name_2.png

chart_2.png

My question is how to achive that the actual value is being displayed, so [IG top country 1] ?

Is there only 1 record in the table?

No, there are various rows in the same format. The chart view itself is called by a filteredview action to only show the values of the selected row. It works for the values itself as it should, but not for the display name. As the label values differ from row to row (the top countries are different for each entry), I need the display name to be dynamic.

sheet_3.png

Alternatively, as display name I also tried 

[_THISROW].[IG top country 1]

which leads to the same result (expression assistant marks it as correct, the test table returns the correct values, but it doesn't show in the chart).

 

I can see 2 options for you.

 

1. Create a new grouped action. Add your existing LINKTOFILTEREDVIEW action as the last action in the group, and replace it's position in your app with the new grouped action. As a first action in the group, set the value of a new [flag] column to NOW(). This way, you can lookup the selected/flagged record's country value in your Display Name expression with: LOOKUP( MAXROW())

 

2. Adjust your data structure as I first mentioned. You'd need your new structure to look like this:

unique-key common_identifier number country value
  a 1 United States 29
  a 2 United Kingdom 15
  a 3 Mexico 3
  b 1 Brazil 15
  b 2 United States 1
  b 3 Portugal 0.3

In this new table structure, you can set the [country] column as the Label, then it will be what appears by default on the chart for each bar.

I tried Option 1, as I can't change the table layout. It works, thanks!

Top Labels in this Space