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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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 ??

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors