cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

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 line chart is % ECL =divide(sum('Appended Loan'[ECL]),sum('Appended Loan'[NETBAL_IIS]))

image.png

 

My dataset and filters are as follows:

 

image.png

 

image.png

 

Anyone knows how to split the line chart?

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Create a 2 bar and 2 line chart

Hi @nailifarhanah ,

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
    )
)

ecl.PNG

 

Best Regards,

Icey

 

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

View solution in original post

4 REPLIES 4
Highlighted
Super User IV
Super User IV

Re: Create a 2 bar and 2 line chart

@nailifarhanah you can add 2nd measure in line chart,.






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





Highlighted
Super User IV
Super User IV

Re: Create a 2 bar and 2 line chart

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Highlighted
Helper II
Helper II

Re: Create a 2 bar and 2 line chart

Create 2 measures for 2018 and 2019 drag and drop the measures in the line values that will work
Highlighted
Community Support
Community Support

Re: Create a 2 bar and 2 line chart

Hi @nailifarhanah ,

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
    )
)

ecl.PNG

 

Best Regards,

Icey

 

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

View solution in original post

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors