User Data: Displaying Individual User Data to all Users

Hello Appsheet community,

I am creating an app in which users can earn points for recycling. At the moment I am trying to create a scoreboard in my app, which is a view that displays each user’s points and sorts them from least to greatest. I have a “Total Recycling Points” Column in my Profile table that refers to the “Total Recycling Points” column in another table called “Recycling Points Chart”. This table has a slice that uses a filter that shows each user their own data. I tried to create app formula that looked like this:

SUM(Recycling Points Chart[Total Recycling Points]

But that returned the total of every user’s points. So I tried

SUM( Recycling Points Chart slice[Total Recycling Points])

Although that returned the current user’s recycling points, it showed the same number for every user.

So here is my question: Can you help me find a formula that will show each individual user’s total recycling points?

Thank you

0 11 179
11 REPLIES 11

Steve
Platinum 4
Platinum 4

Thank you for this reference. I have having some trouble understanding how to combine SELECT () with SUM () and how to add the list of values that is returned.

I tried to use this formula:

SUM(SELECT(Recycling Points Chart[Total Recycling Points], (Email Address = [Email Address]), TRUE))

But the return was “0” for all users. So I tried to use this formula:

SUM(SELECT(Recycling Points Chart[Total Recycling Points], (USEREMAIL() = [Email Address]), TRUE))

But the return was the same Recycling Points for each person.

Could you please elaborate on how to go about changing my formula?

The second expression looks good to me:

Please post a screenshot of the column list of the Recycling Points Chart table from the Data >> Columns tab in the app editor.

Sure! Here it is

3X_7_c_7c8ea4a8f5f9ee2feb2a83c955abd65cb50f7e10.png

And here is the result of the second expression that I used:
3X_c_7_c7541c5485669f545d7dc1755673420c691dd5b5.png

Does View Data for the table display the computed values you expect?

No, it actually displays the same data for every user, except for their emails

Then the problem is with the App formula expressions of your virtual columns. We should probably review them one-by-one. Please post the screenshot of the entire App formula expression for one virtual column that does not produce the intended result, and provide a plain-language description of what you want the expression to compute.

Oh okay. One virtual column that doesn’t produce the result I want is the “Total Plastic Points” column in the “Recycling Points Chart” table. It uses the formula:

SUM(Plastic Bin Slice [Points])+SUM(Additional Plastic Entries Slice[Points])

The goal of this formula is to add all of the points calculated from the entries in the Plastic Bin Slice and the Additional Plastic Entries Slice for a total. Since the slice has this row filter:

[Email address] = USEREMAIL()

The result from View Data is shown below (every row is for a different user). As you can see, it calculates the Total Plastic Points for one user and gives it to every user.

3X_3_c_3cbac111e57c8cf4760b92e62d046bea59998a4a.png

Strangely enough, I never noticed this because the chart that displays Total Plastic Points does not show “520” for each user, as shown in the picture. When I preview as another user, the chart shows the correct number for Total Plastic Points for that user:

3X_4_7_4757cbcfe79bedd1d8163defc69ee34c38c2a25d.png

Whew! I’m confused! I suspect your data is organized in a manner I’m not expecting.

Can you describe your tables and columns in an outline form? Like:

table 1

  • column 1
  • column 2

table 2

  • column 1
  • column 2

Top Labels in this Space