Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
shtak
Helper II
Helper II

Line chart with overall total line

Hi all,

 

I'm creating a line chart with

  distinct series(country sales share)

  and

  a total line which depicts the share for all the countries whichever countries are filtered

 

The following is the Excel image.


1. Country series and overall total share.

LineChart.png 

2. US trend with Total line (Total share is for all the countries which are same values as No.1)

 

LineChart_US_only.png

 

 

How can I create the PowerBI report as above?

I have an idea that

  add records with "total" country to the existing datasource (which is for each country)

  and

  specifiy the datasource on Line chart as if the "total" is one of the countries.

 

The datasource could be confusing, I would ask you for any better ideas.

 

Best regards,

Shinya

2 ACCEPTED SOLUTIONS
v-easonf-msft
Community Support
Community Support

Hi, @shtak 

Please try the following steps:

1. Remove the use of the 'Legend' field and create separate metrics for each country and 'Toatl'

Japan line = CALCULATE(SUM('Table'[Share]),'Table'[Country]="Japan") 
US line = CALCULATE(SUM('Table'[Share]),'Table'[Country]="US") 
UK line = CALCULATE(SUM('Table'[Share]),'Table'[Country]="UK") 
Total line = CALCULATE(Average('Table'[Share]),ALL('Table'[Country])) 

2. New a field Parameter (Available in latest version of PowerBI Desktop)

veasonfmsft_0-1659322598720.png

veasonfmsft_1-1659322673943.png

3. Apply the parameter to Y-axis

veasonfmsft_3-1659323099105.png

Best Regards,
Community Support Team _ Eason

View solution in original post

How can I add overall total line in SSRS ?

 

View solution in original post

5 REPLIES 5
v-easonf-msft
Community Support
Community Support

Hi, @shtak 

Please try the following steps:

1. Remove the use of the 'Legend' field and create separate metrics for each country and 'Toatl'

Japan line = CALCULATE(SUM('Table'[Share]),'Table'[Country]="Japan") 
US line = CALCULATE(SUM('Table'[Share]),'Table'[Country]="US") 
UK line = CALCULATE(SUM('Table'[Share]),'Table'[Country]="UK") 
Total line = CALCULATE(Average('Table'[Share]),ALL('Table'[Country])) 

2. New a field Parameter (Available in latest version of PowerBI Desktop)

veasonfmsft_0-1659322598720.png

veasonfmsft_1-1659322673943.png

3. Apply the parameter to Y-axis

veasonfmsft_3-1659323099105.png

Best Regards,
Community Support Team _ Eason

How can I add overall total line in SSRS ?

 

Hi v-easonf-msft,

 

Thank you for your kind reply with a latest feature.

 

The field parameter feature is very interesting and useful.

In some cases, the feature is available, but this time, the series are actually prducts (I took up 

countries as easy examples, which lead to your solution), which change on an irregular base.

Hopefully I could avoid adding the series(field parameters).

 

Thanks,

Shinya

Hi, @shtak 

Is it convenient to provide a sample to cloud storage for further research?

Best Regards,
Community Support Team _ Eason

 

shtak
Helper II
Helper II

Excuse me,,, the chart images were inconsistent.

The followings are correct ones.

 

Country shares with total share.

LineChart.pngLineChart_US_only.png

 

A country filtered with total share. 

 

Regards,

Shinya

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.