Search code examples
powerbipowerbi-desktoppowerbi-embeddedpowerbi-datasourcepowerbi-custom-visuals

How to calculate average using power bi


In power bi i have 2 table

Table 1 (Total no of seats) Venue 1 100 seats Venue 2 150 seats

Table 2 (No of seats used) Venue 1 40 seats Venue 2 75 seats

I need to calculate how to many seats used

ex (40/100) *100 = 40%

Can someone helps me

**Current database i can't join these table

Try to use average function did not work


Solution

  • Assuming your tables look like this:

    Table 1:

    Venue    | Total Seats
    -----------------------
    Venue 1  |         100
    Venue 2  |         150
    

    Table 2:

    Venue    | Seats Used
    ----------------------
    Venue 1  |         40
    Venue 2  |         75
    

    Create a relationship between Table 1 and Table 2 on field Venue, then you can create a measure:

    Seat Utilisation = 
    DIVIDE ( 
        SUM ( 'Table 2'[Seats Used] ),
        SUM ( 'Table 1'[Total Seats] ),
        BLANK()
    )
    

    See https://pwrbi.com/so_55470616/ for an example PBIX file