The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi guys, I need a help to calculate a profit.
Here the table that I have:
So first of all, we are going to calculate the product price:
- Cost Price: (Cost + Adjust)*Qtd
RM A: (386 + 24)*0,241 = $ 98,81
RM B: (179 + 22)*0,425 = $ 85,42
RM A: (285 + 19)*0,334 = $ 101,54
So my cost price it is: $ 98,81 + $85,42 + $101,54 = $285,77
Now, my sales price it is: $ 285,77 + Fee - Descount = $ 285,77 + $ 40 - $ 73,7 = $ 252,07
My profit will be: $ 252,07 - Weighted Cost (USD) = $ 252,07 - $ 264,29 = $ - 12,22 (this value is for each ton)
The final value and more important is: $ -12,22 * Volume = $ -12,22*567 = $-6.928,74
Solved! Go to Solution.
Hi @IgorAM ,
Based on the data you provided, first I created a calculate column
Cost Price = ('Table'[Cost(USD)]+'Table'[Adjust(USD)])*'Table'[Qtd(%)]
Then create a measure
Profit =
(
SUM ( 'Table'[Cost Price] )
+ (
SELECTEDVALUE ( 'Table'[Fee(USD)] )
- SELECTEDVALUE ( 'Table'[Product Discount(USD)] )
)
- SUM ( 'Table'[Weighted Cost(USD)] )
)
* SUM ( 'Table'[Volume(ton)] )
Change the format of measure
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @IgorAM ,
Based on the data you provided, first I created a calculate column
Cost Price = ('Table'[Cost(USD)]+'Table'[Adjust(USD)])*'Table'[Qtd(%)]
Then create a measure
Profit =
(
SUM ( 'Table'[Cost Price] )
+ (
SELECTEDVALUE ( 'Table'[Fee(USD)] )
- SELECTEDVALUE ( 'Table'[Product Discount(USD)] )
)
- SUM ( 'Table'[Weighted Cost(USD)] )
)
* SUM ( 'Table'[Volume(ton)] )
Change the format of measure
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
I tryed sumx using Raw Material, but it did not work.
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |