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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
youssefm9
Helper I
Helper I

Formula Calculation using Rows descriptions

Hello,

I need help in calculating the following, would appreciate if you can provide with the formula.

 

1. sum of COGS (under category column) over Sum of Income (under Type column)

2. sum of COGS (under category column) over Sum of Recurring (under category column)

 

 

CategoryTypeMonthMonth 2Year Amount 
One-offIncome31 Jan 2022Jan-222022 $     20,000
RecurringIncome31 Jan 2022Jan-222022 $     12,000
COGSExpense31 Jan 2022Jan-222022 $     10,000
FinancialExpense31 Jan 2022Jan-222022 $     12,000
ProfessionalExpense31 Jan 2022Jan-222022 $       1,200
Online toolsExpense31 Jan 2022Jan-222022 $       2,320
TravelExpense31 Jan 2022Jan-222022 $       1,100
Staff SalesExpense31 Jan 2022Jan-222022 $       2,000
Staff AdminExpense31 Jan 2022Jan-222022 $       2,000
One-offIncome28 Feb 2022Feb-222022 $     54,000
RecurringIncome28 Feb 2022Feb-222022 $     23,000
COGSExpense28 Feb 2022Feb-222022 $       1,200
FinancialExpense28 Feb 2022Feb-222022 $     10,000
ProfessionalExpense28 Feb 2022Feb-222022 $       2,300
Online toolsExpense28 Feb 2022Feb-222022 $       2,300
TravelExpense28 Feb 2022Feb-222022 $       4,000
Staff SalesExpense28 Feb 2022Feb-222022 $     12,000
Staff AdminExpense28 Feb 2022Feb-222022 $       3,000

 

Thanks.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@youssefm9 , Nor very clear.

 

measures

 

M1= sumx(filter(Table, [category] = "COGS" && Table[Type] = "Income") ,[Amount]) 

 

 

M2= sumx(filter(Table, [category] = "COGS" && Table[Type] = "Recurring") ,[Amount]) 

 

Hi @amitchandak,

I just want to do 2 formula that returns a value each, given the table i already posted.

 

1. sum of COGS / Sum of Income

2. sum of COGS  / Sum of Recurring 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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