Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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)
| Category | Type | Month | Month 2 | Year | Amount |
| One-off | Income | 31 Jan 2022 | Jan-22 | 2022 | $ 20,000 |
| Recurring | Income | 31 Jan 2022 | Jan-22 | 2022 | $ 12,000 |
| COGS | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 10,000 |
| Financial | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 12,000 |
| Professional | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 1,200 |
| Online tools | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 2,320 |
| Travel | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 1,100 |
| Staff Sales | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 2,000 |
| Staff Admin | Expense | 31 Jan 2022 | Jan-22 | 2022 | $ 2,000 |
| One-off | Income | 28 Feb 2022 | Feb-22 | 2022 | $ 54,000 |
| Recurring | Income | 28 Feb 2022 | Feb-22 | 2022 | $ 23,000 |
| COGS | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 1,200 |
| Financial | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 10,000 |
| Professional | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 2,300 |
| Online tools | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 2,300 |
| Travel | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 4,000 |
| Staff Sales | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 12,000 |
| Staff Admin | Expense | 28 Feb 2022 | Feb-22 | 2022 | $ 3,000 |
Thanks.
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
@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
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 104 | |
| 82 | |
| 72 | |
| 46 | |
| 35 |