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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Reply
A_ksh
Frequent Visitor

Multiple Line chart problem

Hello Everyone 

 

I want a line chart which gives for example C14 for 2 different years with value of each day on same line chart. It is somehow easy to make this type of chart in excel but not in power BI 

Please also find attached image like whihc i want graph to be 

 

A_ksh_0-1699348672291.png

 

I have data like below


Date                 C10         C14          C16          C5TC         C8             C9

04-01-20162791.004405.00-1964.004811.006995.0012070.00
05-01-20162882.004450.00-1984.004676.006345.0012040.00
06-01-20162986.004473.00-1985.004760.006485.0012180.00
07-01-20162741.004205.00-2175.004198.005315.0011235.00
1 ACCEPTED SOLUTION

Hi @A_ksh ,

 

The hierarchy of the x-axis in the chart you have given is Quarter-Month-Day, and you can set up the same hierarchy as shown below.

vtangjiemsft_0-1700617059278.pngvtangjiemsft_1-1700617165512.png

Due to the design of PBI Desktop this is the closest you can get to an excel chart.

If you would like to suggest  feature improvements, you may vote the idea and comment here to improve this feature. It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Neeko Tang

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

11 REPLIES 11
v-tangjie-msft
Community Support
Community Support

Hi @A_ksh ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.

vtangjiemsft_0-1699584030605.png

(2) We can create a calculated column.

Year = YEAR('Table'[Date])

(3) Then the result is as follows.

vtangjiemsft_1-1699584158596.png

Best Regards,

Neeko Tang

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

Thank you so muc for the reply 

But as you can see in excel line chart below we can have fixed x axis from january to december and it gives you option to choose year and different values of C10, C14 etc. so i select lets say 2021 and 2022 it gives me 2 lines of same C14 over the span of january to december, so that its easy to compare on month basis. 

But in power BI it just extends the x-axis for 2 different year and even if i create table for month or select x axis for month it provides sum value for that month not the individual values of everyday. But in excel even though x axis is from Jan to Dec it still provides you daily data and makes graph more smooth. 

here is the comparison of 2 same data in excel and in power bi. 

A_ksh_0-1699598985714.png

This is graph in Excel. 

A_ksh_1-1699599040552.png

 

This is graph in Power Bi. 




Hi @A_ksh ,

 

(1)We can create measures.

 

_c10 = SUM('Table'[C10])
_c14 = SUM('Table'[C14])
_c16 = SUM('Table'[C16])

 

...

(2)Creating Field Parameter.

vtangjiemsft_0-1699950002895.png

(3)Then the result is as follows.

vtangjiemsft_1-1699950082994.png

 

Best Regards,

Neeko Tang

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

Thank you for the reply but the Y axis data is showing monthly agrregated value whereas i have daily data and want daily data to be displyed instead of SUM data of month even though i have selected x  axis to be month. 

Is there you can help me on this. 

Hi @A_ksh ,

 

If you want to display daily data, set the x-axis as shown below.

vtangjiemsft_0-1700530897645.pngvtangjiemsft_1-1700530922939.png

Best Regards,

Neeko Tang

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

 

Thank you 

A_ksh_1-1700549972405.png

 

 

But i want X-Axis to be only from Jan-Dec as shown in above excel graph but even though the X-axis is month basis i want data to be of daily basis. For differerent years i can have years in legend so i can choose year. 

Also Can we connect on Google meet or somewhere else so that we can discuss this because i am stuck on this for weeks now and i see no solutions. 

Here is my email id - akashpandey9299@gmail.com, Please send a message if you will be able to connect Gmeet or somewhere else.

Hi @A_ksh ,

 

If you want the x-axis to be displayed in a date hierarchy, set the x-axis as shown below.

You can explore in-depth details about your data by using the drill-down, drill-up, and expand features on your visual.

Refer : Drill mode in the Power BI service - Power BI | Microsoft Learn

 

vtangjiemsft_0-1700554472848.png

vtangjiemsft_1-1700554509499.png

Best Regards,

Neeko Tang

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

But you see 2016 and 2017 data is coming on x axis on your graph, i want x axis to be set from Jan-Dec and differerent year data should come differently. 

And if i drill up/down data the comes agreegated which not ideal for me, i want even though the x axis is set data should be of everyday. 

And please if you have time can we connect ? because i feel problem is very specific and you can udnerstand once we connect. 

Thank you in advance. 

Hi @A_ksh ,

 

The hierarchy of the x-axis in the chart you have given is Quarter-Month-Day, and you can set up the same hierarchy as shown below.

vtangjiemsft_0-1700617059278.pngvtangjiemsft_1-1700617165512.png

Due to the design of PBI Desktop this is the closest you can get to an excel chart.

If you would like to suggest  feature improvements, you may vote the idea and comment here to improve this feature. It is a place for customers provide feedback about Microsoft Office products . What’s more, if a feedback is high voted there by other customers, it will be promising that Microsoft Product Team will take it into consideration when designing the next version in the future.

 

Best Regards,

Neeko Tang

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

A_ksh
Frequent Visitor

Sorry but i tried and it is not helping, excel provide 2 legend option where i can select different different years and it will show Value of lets say C10 for 2 different year with different line, doing that in power bi just expands the x-axis for 2 years and give continoues graph. 

I want to recreate same what is there in excel and showed in my question. 

HotChilli
Super User
Super User

Sample data with different years would help more but with this data :

Date on the x-axis, individual measures on the y-axis.  If you want a quick chart just select the c10, c14 etc and add them to the y-axis

--

Or you can unpivot the C-columns and write one measure

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

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.