Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Percentage Calculation

Hi,   I'm trying to pull together a "simple" Daily loss percentage based upon rent loss and total rent due for each area.   I am combining two tables: A) a Void table which has a row for each d...
  • OwenAuger's avatar
    6 years ago

    Hi Anonymous 

     

    I would first recommend you set up your data model like this, with Date and Area dimension tables:

    Then write measures as follows:

    Loss Amount = 
    SUM ( 'Granular Voids'[Amount] )
    
    Target Amount = 
    COUNTROWS ( 'Date' ) * SUM ( Target[Target Rent] )
    // This treats Target Rent as a daily amount and multiplies by the number of days filtered
    
    % Void Loss = 
    DIVIDE ( [Loss Amount], [Target Amount] )

    Then the measures should produce the values as expected when filtered on 15 September (using your inputs at the top of the post):

    PBIX attached for reference.

     

    Regards,

    Owen