Forum Discussion
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!!
6 Replies
- HasanResolver I
what is the ACTUAL_STEP at the last table?
- ajimenezFrequent Visitor
The last table is an example, is a matrix in wich i want to get the values when, for example, i filter by the ITEM = 2222 in the STEP = 1, etc. This is another example for the ITEM 2222:
ITEM STEP GOAL DURATION 2222 1 10 26 2222 2 12 10 2222 3 15 15 2222 4 5 20 I only need to calculate de red fields, using DAX measures.
Thanks!!
- v-jiascu-msftMicrosoft Employee
Hi ajimenez,
Maybe you don't need a DAX measure. Please have a look at the picture.
Best Regards!
Dale
- v-jiascu-msftMicrosoft Employee
Hi ajimenez,
Could you please mark the proper answer as solution or share the answer if it's convenient for you? That will be a help to the others.
Best Regards!
Dale- ajimenezFrequent Visitor
I appreciate your collaboration but the answer did not work for my specific case.
Thanks!!