Combine Inline queries and Advanced Tables

Is there a way to Combine Inline queries from dataview and Advanced Tables formulas?

What I’m trying to do

Basically what I want to do is having one cell filled by a property of the note, and another cell with a formula-calculated value based on the first cell. Or, it would be good anyway, to use properties in formulas.

Things I have tried

I’ve tried to insert \=this.property`` into a cell and then do some formula math using that cell but it gives all sort of error.

In the same way, I’ve tried to use directly this.property in the formula, and (as expected) it gave an error

I believe you’ll need to use dataviewjs to achieve your goals. It’s capable of both building the table, and adding calculated rows/column.

I do not believe you’re able to combine dataview and advanced tables formulas, and if that works every now and then, I would suspect it to be very fragile and unreliable…

@holroy thanks a lot for your answer.

I may not be expert enough with that codeblock, I’m not sure how it would help my case… Would you please be so kind to explain a bit further?

We would need some more information to provide some examples.

Could you show a sample table along with which properties and formulas you’d like to use?

A stripped down (non-working) example is:

---
number: 42
---
|      Test      | Test2 | Test+Test2 |
|:--------------:|:-----:|:----------:|
| `=this.number` |  12   |            |
<!-- TBLFM: @>$3=(@>$1+@>$2) -->

@holroy not sure if the example is good enough, let me know. Thanks!

For a simple table like this, you can just do something like this:

```dataviewjs
let test = dv.current().number;
let test2 = 12;
dv.table(["Test","Test2","Test+Test2"],[[test,test2,test+test2]])
```
1 Like

OOOOOH.

NOW I GOT IT.

Ok, I’ve finally understood which door I had to open. And it’s basically JS.

Thanks a lot @Anwen , you made my day.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.