What I’m trying to do
I am trying to make a comparision table using dataview. Instead of creating a table i will list the pros and cons and give them ratings. Then dataview will present them in a table. So far accomplished this much. The code for this part is `
TABLE WITHOUT ID
Ratings1 AS foldables,
choice(contains(Ratings1, "TOTAL"), "**" + round(sum(number(this.Ratings1)), 2) + "**", number(Ratings1)) AS score1,
Ratings2 AS tablets,
choice(contains(Ratings2, "TOTAL"), "**" + round(sum(number(this.Ratings2)), 2) + "**", number(Ratings2)) AS score2
FLATTEN Ratings1 or Ratings2
WHERE file.name = this.file.name
`
Things I have tried
Now i want to show sum of the ratings as well. I added these lines
Ratings1:: TOTAL =sum(choice(contains(Ratings1,"TOTAL"),0,number(this.Ratings1)))
Ratings2:: TOTAL =sum(choice(contains(Ratings2,"TOTAL"),0,number(this.Ratings2) ))
On doing the the sum shows up but the score columns are not populated. ALthough currently the value show up in the first columns. i want the number on their respective column as well.