Forum Discussion

Kolumam2810's avatar
Kolumam2810
New Member
5 years ago
Solved

Outstanding Balance calculation

I have the below table. I need to calculate the outstanding amount as per the below formula. Outstanding Amount = (Principal Amount - Principal Amount * Percentage) So for the first date range (31/...
  • Icey's avatar
    5 years ago

    Hi Kolumam2810 ,

     

    Try this:

     

    Column:

    Column = 
    'Table'[Principal Amount (USD)]
        - SUMX (
            FILTER (
                'Table',
                'Table'[Tranche] = EARLIER ( 'Table'[Tranche] )
                    && 'Table'[Repayment Schedule Start Date]
                        <= EARLIER ( 'Table'[Repayment Schedule Start Date] )
            ),
            'Table'[Principal Amount (USD)] * 'Table'[Percentage]
        )
    

     

    Measures:

    Measure = 
    SUM ( 'Table'[Principal Amount (USD)] )
        - SUMX (
            FILTER (
                ALLSELECTED('Table'),
                'Table'[Tranche] = MAX ( 'Table'[Tranche] )
                    && 'Table'[Repayment Schedule Start Date]
                        <= MAX( 'Table'[Repayment Schedule Start Date] )
            ),
            'Table'[Principal Amount (USD)] * 'Table'[Percentage]
        )
    
    Measure - ModifiedTotalValue = SUMX('Table',[Measure])

     

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.