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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Snapdrag
Helper II
Helper II

Line chart with multiple axis should not split by legend.

Hello, I am facing issue with multiple axis line chart. I am looking for a solution where second axis in line chart should not get split by legend.

 

Chart - Line chart

X axis - Month-Year

Y axis1- Total Time

Y axis2 - Average time 

Legend -  Region

In chart below when I select Country as India in filter, I want my chart to show another average line for Country India but currently it even splits the Average time by region(legend). 

Snapdrag_1-1702030086303.png

 

 Data is as below:

Month YearCountryCityTotal Time
2023-05IndiaBanglore190
2023-06IndiaBanglore200
2023-07IndiaBanglore10
2023-05IndiaMumbai9
2023-06IndiaMumbai10
2023-07IndiaMumbai10
2023-05AustraliaSydney200
2023-06AustraliaSydney200
2023-07AustraliaSydney180
2023-05AustraliaMelbourne90
2023-06AustraliaMelbourne10
2023-07AustraliaMelbourne20
2023-05USAtlanta50
2023-06USAtlanta50
2023-07USAtlanta40
2023-05USChicago80
2023-06USChicago100
2023-07USChicago120
4 REPLIES 4
Snapdrag
Helper II
Helper II

@Ahmedx @amitchandak @Ritaf1983 @parry2k , requesting you to help on this problem. Thanks in advance

Snapdrag
Helper II
Helper II

@Ahmedx @amitchandak @Ritaf1983 @parry2k , requesting you to help on this problem. Thanks in advance

v-junyant-msft
Community Support
Community Support

Hi @Snapdrag ,

Please try this way:
I create a DAX below to calcaulate the average time:

Average Time for Country = 
CALCULATE(
    AVERAGE('Table'[Total Time]),
    ALL('Table'[City]),
    ALLEXCEPT('Table', 'Table'[Country])
)

 

vjunyantmsft_0-1702277209177.pngvjunyantmsft_1-1702277253876.png

The results are as follows:

vjunyantmsft_3-1702277354460.png


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

I want a trend linefor the average in the same way I have for total but the requirement is that average line should not get split by legend.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.