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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
IgorAM
Helper I
Helper I

Product Profit

Hi guys, I need a help to calculate a profit.

 

Here the table that I have:

IgorAM_1-1708810277570.png

 

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

 

 

1 ACCEPTED SOLUTION
v-heq-msft
Community Support
Community Support

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

vheqmsft_0-1709013838411.png

Final output

vheqmsft_1-1709013913848.png

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

 

View solution in original post

2 REPLIES 2
v-heq-msft
Community Support
Community Support

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

vheqmsft_0-1709013838411.png

Final output

vheqmsft_1-1709013913848.png

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

 

IgorAM
Helper I
Helper I

I tryed sumx using Raw Material, but it did not work.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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