ajimenez
9 years agoFrequent Visitor
DAX
Hi everyone,
I have 2 tables:
| ID_STEP | STEP | GOAL |
| 1 | A | 10 |
| 2 | B | 12 |
| 3 | C | 15 |
| 4 | D | 5 |
AND:
| ITEM | ID_STEP | STEP | DURATION |
| 1111 | 1 | A | 5 |
| 1111 | 2 | B | 10 |
| 1111 | 3 | C | 15 |
| 1111 | 4 | D | 20 |
| 2222 | 1 | A | 10 |
| 2222 | 1 | A | 5 |
| 2222 | 2 | B | 10 |
| 2222 | 3 | C | 15 |
| 2222 | 4 | D | 20 |
| 2222 | 1 | A | 3 |
| 2222 | 1 | A | 8 |
| 3333 | 1 | A | 8 |
| 3333 | 2 | B | 0 |
| 3333 | 3 | C | 5 |
| 4444 | 1 | A | 0 |
| 4444 | 2 | B | 6 |
The relation is by the ID_STEP Field.
I need get the actual Goal Step and the Total Duration fields. The result I hope is this:
| ITEM | ACTUAL_STEP | GOAL STEP | TOTAL DURATION |
| 1111 | 2 | 12 | 5 |
| 2222 | 1 | 10 | 26 |
| 3333 | 3 | 15 | 5 |
| 4444 | 2 | 12 | 6 |
How can i do It?
Thanks!!