Forum Discussion

Mark_Vdc's avatar
Mark_Vdc
New Member
1 month ago
Solved

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 Engineer 
  • 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.

     

2 Replies

  • Rupa01's avatar
    Rupa01
    Icon for Solution Sage rankSolution 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 
  • 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.