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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
O_L
New Member

Automatic division with DAX

Hi, 

I would like to know if it is possible to create a tool in DAX that takes input of one number and devides it automatically between units by a criteria. For example - dividing budget between classes according to number of students.

Any guidance is appreciated.

Thanks!

4 REPLIES 4
amitchandak
Super User
Super User

@O_L , Can you share sample data and sample output in table format?

 

But refer these allocation files

https://www.dropbox.com/s/fnq82ksdzk1lqs3/Target_allocation_daily.pbix?dl=0

 

https://www.dropbox.com/s/8glxcvntixq1knt/allocations.pbix?dl=0

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Greg_Deckler
Community Champion
Community Champion

@O_L - Almost certainly yes.

 

Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks for your comment! and aplogy for the unclear question...

I tried to display the problem according to the format:

 

1. I have the following report:

unitincomecost
administaration-100
class 110050
class 220070
class 330090
class 4400100

 

2. The expected result will be a new table or an update of the original one that will end up like this:

unitincomefinal cost
class 110066
class 220093
class 3300119
class 4400132

 

3. how to get from 1 to 2:

I need a power BI tool that takes the administration costs and divide it within the classes in accordance to the classes costs.

Like here:

unitincomecostadministaration cost divisionfinal cost
administaration-100--
class 1100501666
class 2200702393
class 33009029119
class 440010032132
SUM 310100 

 

The "administaration cost division" column represents the part from the administration cost (100) that every class carries - for class 1 the clalcluation will be: 100*50/310=16.

The "final cost" column represents the sum of the class cost and the partial administration cost.

At the end it will show only the "unit", "income" and "final cost" columns.

 

Since it is going to be a routine procedure I'm looking for an automatic tool as much as possible. 

 

Thanks!

Anonymous
Not applicable

This is in fact a very easy calculation. The only question is whether this is to be a calculated column or a measure...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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