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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Row Level Sum Sales Less COS = GP

I have two tables

1. Finance Data dumb table (Which is having Full Finance Transactions) 

2.  Ledgers grouping table separate.

Linked both table with common field of account code.

Grouping Table is having Mani Group Sales, Cost, Staff Expneses , Admin Exp, Depriciations

I need the Report Like

                                  Jan         Feb        Mar      Apr

Sales

Cost

GP (Sales-Cost)

GP %

Staff Exp

Admin Exp

Operating Profit 

(GP-StaffExp-Admin Exp

Depreciation

Profit 

(Operating Profit - Depreciation)

 

Please give some ideas about that

 

 

 
 
2 ACCEPTED SOLUTIONS
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, Grouping Table has Mani Group Sales, Cost, Staff Expneses , Admin Exp, Depriciations, so what's the stage of the data? All the year round or current month? And what's in the Finance Data dumb table. Would you like to provide a simple demo to clirefy the problem?

 

Best Regards,
Community Support Team _ kalyj

View solution in original post

ReneMoawad
Resolver III
Resolver III

Hi,

First you needd to Create a new table by using "Enter Data", this table should include 2 columns (Description, Order)

in the Description column you need to add the below

  • Sales
  • Cost
  • GP (Sales-Cost)
  • GP %
  • Staff Exp
  • Admin Exp
  • Operating Profit 
  • (GP-StaffExp-Admin Exp
  • Depreciation
  • Profit 
  • (Operating Profit - Depreciation)

and in the Order column you need to specify the order of each row from 1 to 11

Screenshot 1.png

 

After that, you need to click on the field Description, and change the Sort Column

 

Screenshot 2.png

 

After doing that, you need to create a measure for each of the description example: SalesMeasure = SUM(Sales), CostMeasure = SUM(Cost)...

 

The last measure that you will be using in the Matrix is the the below:

FinalResult = 

Var selectedDescription = SELECTEDVALUE(NewTable[Description])

Return

SWITCH(

    selectedDescription

    , "Sales", [SalesMeasure]

    , "Cost", [CostMeasure]

    , "GP (Sales-Cost)", [SalesMeasure] - [CostMeasure]

    , ...

)

View solution in original post

2 REPLIES 2
ReneMoawad
Resolver III
Resolver III

Hi,

First you needd to Create a new table by using "Enter Data", this table should include 2 columns (Description, Order)

in the Description column you need to add the below

  • Sales
  • Cost
  • GP (Sales-Cost)
  • GP %
  • Staff Exp
  • Admin Exp
  • Operating Profit 
  • (GP-StaffExp-Admin Exp
  • Depreciation
  • Profit 
  • (Operating Profit - Depreciation)

and in the Order column you need to specify the order of each row from 1 to 11

Screenshot 1.png

 

After that, you need to click on the field Description, and change the Sort Column

 

Screenshot 2.png

 

After doing that, you need to create a measure for each of the description example: SalesMeasure = SUM(Sales), CostMeasure = SUM(Cost)...

 

The last measure that you will be using in the Matrix is the the below:

FinalResult = 

Var selectedDescription = SELECTEDVALUE(NewTable[Description])

Return

SWITCH(

    selectedDescription

    , "Sales", [SalesMeasure]

    , "Cost", [CostMeasure]

    , "GP (Sales-Cost)", [SalesMeasure] - [CostMeasure]

    , ...

)

v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, Grouping Table has Mani Group Sales, Cost, Staff Expneses , Admin Exp, Depriciations, so what's the stage of the data? All the year round or current month? And what's in the Finance Data dumb table. Would you like to provide a simple demo to clirefy the problem?

 

Best Regards,
Community Support Team _ kalyj

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.