Forum Discussion
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]))
My dataset and filters are as follows:
Anyone knows how to split the line chart?
Thank you.
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.
4 Replies
- parry2k
Super User
Anonymous you can add 2nd measure in line chart,.
- Ashish_Mathur
Super User
Hi,
Share the link from where i can download your PBI file.
- abhi9255
Advocate II
Create 2 measures for 2018 and 2019 drag and drop the measures in the line values that will work - Icey
Community Support
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.