The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
@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
@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.
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:
unit | income | cost |
administaration | - | 100 |
class 1 | 100 | 50 |
class 2 | 200 | 70 |
class 3 | 300 | 90 |
class 4 | 400 | 100 |
2. The expected result will be a new table or an update of the original one that will end up like this:
unit | income | final cost |
class 1 | 100 | 66 |
class 2 | 200 | 93 |
class 3 | 300 | 119 |
class 4 | 400 | 132 |
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:
unit | income | cost | administaration cost division | final cost |
administaration | - | 100 | - | - |
class 1 | 100 | 50 | 16 | 66 |
class 2 | 200 | 70 | 23 | 93 |
class 3 | 300 | 90 | 29 | 119 |
class 4 | 400 | 100 | 32 | 132 |
SUM | 310 | 100 |
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!
This is in fact a very easy calculation. The only question is whether this is to be a calculated column or a measure...
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |