Forum Discussion
Divide in Power BI
Hi! I'm rather new with Power BI so probably this is a stupid question but I can't find the answer.
I have two tables:
1) Calculation of total of used storage per network (which is a table "Pivot werkingskosten" I added in power BI)
2) Uploaded table 'budgetten' which is the maximum storage per network.
My question: how do i calculate (in a new table) the usage of the storage per network?
I tried with this: Usage budget = divide(SUM('Pivot werkingskosten'[totaal]),sum(Budgetten[Budget Werkingskosten])) but that does not seem to work...
Any suggestions?
Hi Mark_Vdc,
In the Data model, create a relationship between the two table by Network or merge both the tables by Network in Power query.
Use below measure - For Example - Network #79402319 - (10750 / 46047) * 100 = 23.34%
Measure = DIVIDE( SUM('Pivot werkingskosten'[totaal]), SUM(Budgetten[Budget Werkingskosten]), 0 )π‘ Helpful? Give a Kudos π β keep the community growing
β Solved your issue? Mark as Solution βοΈ β help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics EngineerHi Mark_Vdc
Can you please provide more info.
1. Does the Budget table contain a unique value in Network column?
2. have you created the relation between these two table based on network?
If above one is correct then:
Many-to-One relationship from the Pivot werkingskosten table to the Budgettentable.Pivot werkingskosten[Network] ---------> Budgetten[Network]
then create a measure using below dax.
Usage Budget =
DIVIDE(
SUM('Pivot werkingskosten'[totaal]),
SUM(Budgetten[Budget Werkingskosten]),
0
)- Add a Table visual.
Put: - Netwok
- sum('Pivot werkingskosten'[totaal])
- sum(budgetten[Budget wekingskosten])
- Usage Budget
If this answers your questions, kindly accept it as a solution and give kudos.
- Add a Table visual.
2 Replies
- Rupa01
Solution Sage
Hi Mark_Vdc,
In the Data model, create a relationship between the two table by Network or merge both the tables by Network in Power query.
Use below measure - For Example - Network #79402319 - (10750 / 46047) * 100 = 23.34%
Measure = DIVIDE( SUM('Pivot werkingskosten'[totaal]), SUM(Budgetten[Budget Werkingskosten]), 0 )π‘ Helpful? Give a Kudos π β keep the community growing
β Solved your issue? Mark as Solution βοΈ β help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer - mdaatifraza5556
Super User
Hi Mark_Vdc
Can you please provide more info.
1. Does the Budget table contain a unique value in Network column?
2. have you created the relation between these two table based on network?
If above one is correct then:
Many-to-One relationship from the Pivot werkingskosten table to the Budgettentable.Pivot werkingskosten[Network] ---------> Budgetten[Network]
then create a measure using below dax.
Usage Budget =
DIVIDE(
SUM('Pivot werkingskosten'[totaal]),
SUM(Budgetten[Budget Werkingskosten]),
0
)- Add a Table visual.
Put: - Netwok
- sum('Pivot werkingskosten'[totaal])
- sum(budgetten[Budget wekingskosten])
- Usage Budget
If this answers your questions, kindly accept it as a solution and give kudos.
- Add a Table visual.