Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

How to show total as an average in matrix visualization?

Hello All,   I need to show sum of loan amount for a particular month and then display the average loan amount for a quarter. If I fetch loan amount from My table and then use power bi to average i...
  • Datatouille's avatar
    Datatouille
    9 years ago

    HI hohlick Anonymous,

     

    Supposing you have a Calendar or Date table dedicated to Time Intelligence.

     

    [LoanMeasure] = AverageX( Values(Calendar[Month] ) ,  Calculate ( Sum( 'Fact'[LoanAmount] ) ) ) also works and doesn't need any IF statement.

     

    Even better, use interim measure:

    [SumOfLoanAmount] = Sum( 'Fact'[LoanAmount] )

     

    And use this measure:

    [LoanMeasure] = AverageX( Values(Calendar[Month] ) ,  [SumOfLoanAmount] )

    A measure automatically wraps a "Calculate" which activates context transition.