Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Create a 2 bar and 2 line chart

Hi,   I'm trying to present a chart with 2 lines instead of one but power BI currently shows the line chart as a total for both years, instead of showing separately. The measure I included for the ...
  • Icey's avatar
    6 years ago

    Hi Anonymous ,

    Just create two measures like so:

    % ECL 2018 =
    DIVIDE (
        CALCULATE (
            SUM ( 'Appended Loan'[ECL] ),
            YEAR ( 'Appended Loan'[Month] ) = 2018
        ),
        CALCULATE (
            SUM ( 'Appended Loan'[NETBAL_IIS] ),
            YEAR ( 'Appended Loan'[Month] ) = 2018
        )
    )
    % ECL 2019 =
    DIVIDE (
        CALCULATE (
            SUM ( 'Appended Loan'[ECL] ),
            YEAR ( 'Appended Loan'[Month] ) = 2019
        ),
        CALCULATE (
            SUM ( 'Appended Loan'[NETBAL_IIS] ),
            YEAR ( 'Appended Loan'[Month] ) = 2019
        )
    )

     

    Best Regards,

    Icey

     

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