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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply

Calculate costs derived from another Department Category (operating vs corporate data)

I have a requirement to assign Corporate Expenses to the several Operating Departments according with the percentage of the Cost of Sales.

 

1. The percentage of Operating Cost of Sales per Department (% Operating Cost of Sales)

 

gerardotrejogcg_0-1642997059835.png

2. The Total Corporate Expenses (Corporate Amount)

gerardotrejogcg_3-1642997767128.png

3. The expected result is to multiply The Corporate Cost of Sales by the % of Expenses of each Operating Department.

The issue is that I'm not able to assing the Corporate cost on the Operating side. 

First row = 22,207,639.31 * 0.26%

....

Last row = 22,207,639.31 * 3.13%

 

gerardotrejogcg_4-1643000410205.png

 

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

Hi, @gerardotrejogcg ;

Try it.

Measure = MAXX(ALL('Table'),[Corporate Expense])*[% Operating Cost of Sales]

The final output is shown below:

vyalanwumsft_0-1643264803363.png


Best Regards,
Community Support Team_ Yalan Wu
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

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @gerardotrejogcg ;

Try it.

Measure = MAXX(ALL('Table'),[Corporate Expense])*[% Operating Cost of Sales]

The final output is shown below:

vyalanwumsft_0-1643264803363.png


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ValtteriN
Super User
Super User

Hi,

This kind of dax should do what you want:
[Allocated costs] = MAX(Table[% operating cost of sales])*CALCULATE(AVERAGE(Table[Corporate expenses]),ALL(Table), Table[Corporate expenses]<>BLANK())


I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!






Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I tried to adequate the provided dax with no luck.   

This is the expected result I want to reach.   Corporate Expense in gray means that currently I'm not able to assign that measure for "Operaciones" (Operating Department) since the result is calculated for "Corporativo" (Corporate Department) only.    

The result is limited to apply the Corporate Expense multiplied by % Operating Cost of Sales.

gerardotrejogcg_0-1643048411537.png

This is the sample data link

Operating Cost of Sales =
CALCULATE (
CALCULATE (
'Measure Slicers'[Measure Selection P&L],
ALLEXCEPT ( 'Accounts P&L', 'Accounts P&L'[KPI Name] ),
ALLEXCEPT( 'Dimension Sets', 'Dimension Sets'[Deparment Category] ),
FILTER ( 'Accounts P&L', 'Accounts P&L'[KPI Code] = "T200" ) --> Cost of Sales
),
FILTER ( 'Dimension Sets', 'Dimension Sets'[Deparment Category] = "Operaciones")
)

% Operating Cost of Sales =
DIVIDE ( [Amount P&L MXN], [Cost of Sales Operaciones], BLANK() )

Corporate Expense =
CALCULATE (
CALCULATE(
[Actual Expense Amount],
ALLEXCEPT ( 'Dimension Sets', 'Dimension Sets'[Deparment Category] )
),
FILTER ( 'Dimension Sets', 'Dimension Sets'[Deparment Category] = "Corporativo")
)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors