Forum Discussion
Master Transaction Table-Assistance
- 3 years ago
Hi, sa100
You can refer to this .pbix file.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , sa100
For your need , you want to calculate the bonus, you can try to refer to :
We can create a measure like this:
Profit/Loss Bonus (Quantity *0.001) =
var _minbuydate=[Date of Sale]
var _currentdate=MAX('Table'[Trade Date])
var _datediff=DATEDIFF(_minbuydate,_currentdate,DAY)
return
IF(MAX('Table'[Order Type])="Sell",IF(_datediff>365,SUM('Table'[Quantity])*0.001,0.000),BLANK())
Then we put it on the visual :
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you v-yueyunzh-msft for bonus calculation.
But the main part of my query is-How should I calculate profit and loss as it include split the purchase/sales value in a single row or add the two rows values from Master Transaction Table. Thank you.