That's the odd one.
I have a virtual column calculating month's Status (Past, Current, Future). It's been (the Status column) there from the beginning and never caused any problems.
Recently I've been working on some calculations and from one thing to another I discovered that the table I am working from (let's call it Tag), is not reading this Status column correctly. By "not reading" I mean any Tag's column expression field. VC, Show, Require, etc.
Examples:
If I call Months[Status] from any other table, or automation it gives me a list of all Statuses in the Month table. It would be "Past, Past, Past, Current, Future, Future, Future" giving the Month table has 7 records.
But if I do it from Tag table, it always gives me "Past, Past, Past, Past, Past, Past, Past".
I checked every possible middle step. Tag reads all the other Month columns correctly (unless it's VC and its expression contains Status, then it uses the wrong value). No other table reads Status this way. Tag reads and calculates all parts of Status calculations correctly.
Has anyone dealt with a similar issue?
Is "Months" a table or a Slice? Are there any Security Filters that could be affecting the list of rows?
Please show examples of what you are seeing so we can help better.
I suspect there is something affecting the available data in your different use cases. You need to determine which rows each use case is being given. Try showing the Row Keys instead of the [Status] column. OR temporarily show the Months data rows in an inline table to see the delivered Rows.
it may be that you are getting back the SAME row 7 times, which would indicate some kind of connection/reference issue.
It took the better part of my day but I managed to fix it. What caused the interference were nested SELECT statements in one of Tag's VCs. What I did looked something like that:
SELECT(Some Table[Column], AND([Date]>=ANY(Month Slice[Start Date]), [Date]<=ANY(Month Slice[End Date]))) where Month Slice is filtered by [Status]=Current
Basically, I looked for the records from the current month, since the Month has a custom start and end date.
AppSheet really didn't like that. As well as any other variation that would call for Month Slice from inside this SELECT. When I removed this VC everything went back to normal. I didn't investigate further but my guess would be that something didn't translate right in the generated baseline SELECT statement.
Something to keep in mind when expression starts to give wonky results.
User | Count |
---|---|
18 | |
9 | |
8 | |
5 | |
5 |