Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hei
There are two tables.
First table:
| Amount | Date | Key |
|---|---|---|
| 100 | 2016-01-30 | 1 |
| 200 | 2016-02-28 | 1 |
| 300 | 2016-03-31 | 2 |
| 50 | 2016-04-30 | 2 |
Second table:
| Key | Date2 | Value |
|---|---|---|
| 1 | 2016-03-30 | 10 |
| 1 | 2016-03-31 | 20 |
| 1 | 2016-04-01 | 30 |
| 2 | 2016-03-30 | 15 |
| 2 | 2016-03-31 | 25 |
| 2 | 2016-04-01 | 35 |
I was struggling to accomplish this task by using Set analysis.
Please find the qvw.
Thank you!
Still cannot get it right.
I have modified the expression to:
=sum(Amount)/only({<Date = {"2016.03.31"}>} Value)
It do not calculate the Total value:

Total sum works while selecting the State:

How should I solve that?
Thank you in advance!
can you try this
sum(Amount)/Sum({<Date = {"2016.03.31"}>} Total <State>Value)
Unfortunately:

change total mode from "Expression total" to "Sum of Rows"
or try this
sum(Amount)/only({<Date = {"2016.03.31"}>} Total <State>Value)
Not a problem ![]()

Both expressions return correct answers when changing from Expression Total to Sum of Rows.