SELECT asking of Yes/No?

Hello

Been trying to use SUM(SELECT()), but can’t get it working. Below screenshot:

Isn’t the first argument supposed to point which column is used, in this case total value of opportunity, “Amount” column in Opportunities table. Second argument then setting two filters/requirements, which rows to pick.

Still I get error that first value is number, not a yes/no as supposed. Any ideas why?

I am trying to make a slice, the screenshot is from slice settings.

Check the column type in Amount other than Yes/No. You may have accidentally changed it

1 Like

Please check if the column type is set to Y/N instead of Number type by any chance.

The error is saying that the SUM(SELECT(…)) will produce a number type result but the column type is expecting a binary (Y/N) result. So it sounds that the column is set to Y/N type or you are possibly using the expression in a filter setting such as a slice filter that expects a Y/N expression result.

A SELECT() on [Amout] will create a list of amounts from multiple rows as per condition in select. And the SUM() will add those amounts from the list producing a single number or price.

Thank you for the support!

Column is Number type, yet indeed a filter field for Slice, thus apparently expecting Y/N. Thus I am doing this just in wrong place.

Goal is to make a number showing sales of past e.g. 12 months. No diagram, no table, but just a number on dashboard. How would you built one, with separated slice or somehow with UX?

Typically summing up across multiple records is prone to include multirow computation. There could be multiple ways to do the needful.

In general, you could create a slice called say “Yearly Opportunities” on the table “Opportunities” with a filter expression something like

AND([Stage] =“Closed Won”, [Actual Close Date]>TODAY()-365)

Then you could have a summary view on that table grouped by [Stage] and followed by [_ROWNUMBER]

An example below

The above view is based on slice Yearly orders with filter expression as below.

@Suvrutt_Gurjar Please translate the book you made into Spanish. Do it if you want with ChatGPT, you would help a lot of people. I could even check the translation if you want. You are a great contribution to this community

1 Like

Thank you very much @Gustavo_Eduardo for your appreciation. About your book translation suggestion, I will definitely convey your suggestion to the publisher.

Thank you very much again for your kind words.

We know that you also have been a very active and enthusiastic community contributor with a number of interesting feature ideas. Keep it up and best regards.

1 Like

I thank you very much for everything and I always rely on great collaborators like you! This community has been and continues to be the most important part of AppSheet, and I take back any statement I made in the past saying that AppSheet was falling behind. It was really a blindness on my part, but I must also say that AppSheet is one of the most powerful and democratic platforms in the world for creating apps, with even greater potential for the future. This has no limits; it only takes Google to realize it.

1 Like