Forum Discussion
Creating a new table based on calculations performed on rows from another table
Hi,
I have a table containing a 'Transaction_ID' coumn along with a 'price' column, such as below:
| Transaction_ID | price |
| 1 | 12 |
| 1 | 13 |
| 1 | 15 |
| 2...etc. |
There can be several rows of this table containing the same transation IDs and I'd like to create a new table which asseses the rows and calculates the average price for each transaction, the minimum price...etc.:
| Transaction_ID | average price | minimum price |
| 1 | ||
| 2 | ||
| 3 |
I'd greatly appreciate any help with this. Many thanks.
Hi boddydan ,
You have two options:
Power Query - M Language
- Create a new table that references the first one
- Go to Transform Group by
- Select the Group by ID and the average of the price:
DAX
- Add a new calculated table with the following code:
2 Replies
- AnonymousNot applicable
Hi boddydan ,
Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!
Hope it helps,
Community Support Team _ CaitlynIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.