Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
hii~
I need help in finding this relative price( to find profit/loss),where i need to subtract Traded Price(from Sample Transactions table) with Market Price(from Price table), based on the columns of buy/sell (from Sample Transactions table).
Here is what i did, but it can't be calculated and I can't put it in the matrix table.
Solved! Go to Solution.
Hi, @camelia_ ;
Try it.
Measure =
IF (
MAX ( 'Sample Transactions'[Buy/Sell] ) = "Sell",
SUM ( 'Sample Transactions'[Total Trade Price*] ) - SUM ( 'Price'[PRICE] ),
IF (
MAX ( 'Sample Transactions'[Buy/Sell] ) = "Buy",
-1
* ( SUM ( 'Sample Transactions'[Total Trade Price*] ) - SUM ( 'Price'[PRICE] ) ),
BLANK ()
)
)or
Column =
IF (
'Sample Transactions'[Buy/Sell] = "Sell",
'Sample Transactions'[Total Trade Price*] - SUM ( 'Price'[PRICE] ),
IF (
'Sample Transactions'[Buy/Sell] = "Buy",
-1
* ( 'Sample Transactions'[Total Trade Price*] - SUM ( 'Price'[PRICE] ) ),
BLANK ()
)
)Best Regards,
Hi, @camelia_ ;
Try it.
Measure =
IF (
MAX ( 'Sample Transactions'[Buy/Sell] ) = "Sell",
SUM ( 'Sample Transactions'[Total Trade Price*] ) - SUM ( 'Price'[PRICE] ),
IF (
MAX ( 'Sample Transactions'[Buy/Sell] ) = "Buy",
-1
* ( SUM ( 'Sample Transactions'[Total Trade Price*] ) - SUM ( 'Price'[PRICE] ) ),
BLANK ()
)
)or
Column =
IF (
'Sample Transactions'[Buy/Sell] = "Sell",
'Sample Transactions'[Total Trade Price*] - SUM ( 'Price'[PRICE] ),
IF (
'Sample Transactions'[Buy/Sell] = "Buy",
-1
* ( 'Sample Transactions'[Total Trade Price*] - SUM ( 'Price'[PRICE] ) ),
BLANK ()
)
)Best Regards,
hii @YalanWu_test
If i have this function,
omg it worked,thanks a lot!
@camelia_ , You need to create a common column and then you can take diff of measures from two tables against common dimensions
Hi @amitchandak , I already have the combined table like in attached link, its just that i can't subtract it since it involves 2 different tables with condition.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 9 | |
| 8 | |
| 7 |