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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Simple Cost Ratio from GL Data

Hello all, pretty frustrated with what I feel should be a simple task

 

I have a simple set of GL data, as seen below, where my amount is in one column, and my accounts are rows.

 

morrellmunyon_0-1637017140102.png

 

I then do a very simple model where I have a GL Account class lookup table, which assigns the class "revenue" and "cost" to each account.

 

morrellmunyon_1-1637017217341.png

 

I then just want to have a simple cost ratio at the account level, of cost/total revenue. the table should look as such below, but nothing returns at the account level for a margin. even the revenue accounts are wrong, as Revenue Reg should be 60% of total revenue, , and Revenue Spec should be 40%

 

morrellmunyon_2-1637018218748.png

My measures are 

Value = SUM(data_table[Amount])
Total Revenue = CALCULATE([Value],gl_class[Class]="Revenue")
Cost Margin = DIVIDE([Value],[Total Revenue])
 
any help would be greatly appreciated
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please have  a try.

Create a measure.

Total Revenue = CALCULATE(SUM('Table'[Amount]),ALLEXCEPT(gl_class,gl_class[Class ]))

11.PNG

Best Regards

Community Support Team _ Polly

 

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
Anonymous
Not applicable

Hi @Anonymous ,

Please have  a try.

Create a measure.

Total Revenue = CALCULATE(SUM('Table'[Amount]),ALLEXCEPT(gl_class,gl_class[Class ]))

11.PNG

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

wdx223_Daniel
Super User
Super User

Total Revenue = CALCULATE([Value],gl_class[Class]="Revenue",all(gl_class[Account]))

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.