Forum Discussion
Multiply two columns in different tables by most recent date
Hi,
I'm having trouble multiplying two colums in two tables to get the most recent value.
The tables look like this:
| table1 | ||
| uid | TickRef | Count |
| 1 | AB1 | 10 |
| 2 | AB4 | 20 |
| 3 | XY2 | 5 |
| 4 | XY1 | 5 |
| table2 | |||
| uid | Date | TickRef | Value |
| 1 | 31/01/2019 | AB1 | 100 |
| 2 | 31/01/2019 | AB4 | 200 |
| 3 | 30/06/2019 | XY2 | 10 |
| 4 | 30/06/2019 | XY1 | 50 |
| 5 | 30/06/2019 | AB1 | 150 |
| 5 | 31/07/2019 | XY2 | 20 |
The TickRef in both tables are related and is one to many, table2 having many entries. What I want to achieve is to multiply sum of Count in table1 with the value from table2 with the most recent date.
Expected result should be like this:
| Expected Result | |||
| TickRef | Sum Count | Latest Value | Product |
| AB1 | 10 | 150 | 1500 |
| AB4 | 20 | 200 | 4000 |
| XY2 | 5 | 20 | 100 |
| XY1 | 5 | 50 | 250 |
I can't seem to figure this one. Please help or share a link with solution to a similar problem.
Thanks
Can you please refer the above steps to get the expected result with out DAX.
2 Replies
- amitchandak
Super User
I think summarizing data across table worth exploring
https://community.powerbi.com/t5/Desktop/Summarize-multiple-tables-in-DAX/td-p/642693
- venal
Memorable Member
Can you please refer the above steps to get the expected result with out DAX.