Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
EdwardNg
Regular Visitor

Calculating MTM Value based on Month End Position with Last Price

Hi,

 

I have 2 tables, Price and Transactions. Example as below:

 

Price Table

DateProductPrice
2/1/2020A1.5
29/1/2020A1.3
2/2/2020A1.25
28/2/2020A1.2
2/1/2020B5.1
29/1/2020B5.3
2/2/2020B5.4
28/2/2020B5.55

 

Transactions Table:

TradeDateProductQty
5/1/2020A100
6/1/2020A300
7/1/2020A400
8/1/2020A-200
7/2/2020A-100
8/2/2020A250
5/1/2020B120
6/1/2020B210
7/1/2020B300
8/1/2020B200
7/2/2020B-400
8/2/2020B100

 

I want to calcuate the month end market value based on the last price for the month and accumulated balance for each of the products. 

 

Expected Results:

MonthProductQtyLast PriceMarketValue
JanA6001.3780
JanB8305.34399
FebA7501.2900
FebB5305.552941.5

 

How do i link the tables and calculate the Market value by Month and Product?

 

Thanks

Ed

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@EdwardNg , Please find the attached solution after the signature.

Create common dimensions, Joins, and few measures

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@EdwardNg , Please find the attached solution after the signature.

Create common dimensions, Joins, and few measures

for the qty, can we do live-to-date balance instead of just the balances for the month?

 

 

@amitchandak  thanks for the prompt response. 

 

Also, if i have additional fields in the transactions i want to display in the summary, it gives me a problem. For example if we have product description, it gives the permuatation, as below:

 

summary table.JPGtransaction table.JPG

 

 

 

 

 

 

Could you kindly advise? appreciate your thoughts on this.

 

Many thanks

 

@EdwardNg , one product has two description ??

each product only has 1 description. But this is probably just the simplified version. There could be other fields like company, etc. So each product could be have different values for company. hope this is clear.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.