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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shalini1816
Frequent Visitor

Need help to create 2 line chart in Power BI

Hello Experts,

 

I need to create Burn Chart, which has 2 lines in a Line chart.  Sample data as below, I need to create 2 lines, one with open time and running count, other with completion date and complete count. With single line , it works as expected, but i need to see both the data/lines in single chart.

 

Open TimeRunning CountCompletion DateComplete Count
7/24/13 10:2316/20/14 7:001
7/24/13 10:23211/3/14 8:002
7/24/13 10:2331/6/15 0:003
7/24/14 10:2341/11/15 0:004
7/24/14 10:2351/11/16 0:005
9/26/15 11:0061/19/16 0:006
9/26/15 11:0071/19/17 0:007
9/26/16 11:0081/20/17 0:008
9/26/16 11:009  
9/26/16 11:0010  
9/26/17 11:0011  

 

I tried with Line chart in power BI, but it didnt work correct using multiple values. I need the graph as below,

 

Two_line_chart.PNG

 

But in Power BI, its coming different,

 

Two_line_chart_PowerBI.PNG

 

 

1 ACCEPTED SOLUTION

You are on a good way to solve your problem! 

You need to create three tables:

 

  • Date Table - this table just has dates, you can create it directly in Power BI;
  • "Running Count" Table - this table has 2 columns: Open Time and Running Count;
  • "Complete Count" Table - this table has also 2 columns: Completion Time and Complete Count.

 

After that, you connect "Running Count" Table and "Complete Count" Table to the Date Table using relationships and use the date field from the Date Table to your X-axis.

 

Any doubt let me know!

View solution in original post

10 REPLIES 10
V-lianl-msft
Community Support
Community Support

Hi @Shalini1816 ,

 

You can refer to this:https://community.powerbi.com/t5/Desktop/Displaying-multiple-dates-across-a-single-x-axis/td-p/13032... 

 

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

guiggs
Helper II
Helper II

Hi @Shalini1816!

 

Both lines are cummulative, right?

Yes.  @guiggs .   

You are using the MAX of the two variables, so you are getting the wrong values.

You need to create a measure that get the cummulative vallues for the graphic

its not cumulatve. I mean the incremental count is used. i.e., Running count. (1 to total rows) and completed count (1 to completed items count). the first graph is done in EXCel, which uses open time and running count data for 1st line and complete date and complete count for second line.  But in power BI we dont have option to select individual data for each line. Is It possible to achieve through any measures or formulas.

 

In second chart, you can see the sky blue line is correct, beacuse i am using open time in axis. If I use close time in axis, then the sky blue is showing wrong and dark blue will show correct. not sure how to reslove this.

Reading what you said, I presume that you just have the table that you present in your model.

You didn't have a date table (like a dimension)?

Yes, Exactly. @guiggs  But still i tried to create a new Table with date colum and tried with userelationship, but it didnt work.

 

Regards,

Shalini R

You are on a good way to solve your problem! 

You need to create three tables:

 

  • Date Table - this table just has dates, you can create it directly in Power BI;
  • "Running Count" Table - this table has 2 columns: Open Time and Running Count;
  • "Complete Count" Table - this table has also 2 columns: Completion Time and Complete Count.

 

After that, you connect "Running Count" Table and "Complete Count" Table to the Date Table using relationships and use the date field from the Date Table to your X-axis.

 

Any doubt let me know!

Thank You so much @guiggs  It Works Perfectly.

You're welcome!

 

Best regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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