cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MemeGod Frequent Visitor
Frequent Visitor

Plot two dataset from two different on the same axis

Hej,

 

I wish to plot two different dataset from two different date interval on the same graph. With date on the axis if possible.

Rationale: In order to compare two different data from two date, for example, a stock price from  Aug to Sep 2015 against stock price from Mar-May 2019. The date interval might now be exactly the same length.

 

Currently implemented solution: Shift the date manually using "DATEADD" command, to shift date.

I am wondering if there are any easier method?

 

Best,

 

3 REPLIES 3
Super User IV
Super User IV

Re: Plot two dataset from two different on the same axis

Use Summarize table

 

Union data Sets= union(SUMMARIZE(Sales,Sales[Brand],"Col1",sum(Sales[Sales]),"Col2",sum(Sales[COGS]),"sort",COUNTROWS(Sales)),DATATABLE("Area",STRING,"Col1",DOUBLE,"Value",DOUBLE,"Clo2",DOUBLE
,{
{"    ",0.0,0.0,10000}
}
) )

I used DATATABLE just to showcase the same datatype is needed. You can use the second SUMMARIZE table too.

 





Did I answer your question? Mark my post as a solution!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


MemeGod Frequent Visitor
Frequent Visitor

Re: Plot two dataset from two different on the same axis

Hej thank you for Swift answer,

 

I think we understand two different things, my data is a time series of values, it might not have an equal length.

However, what I want is to have a plot of two or more time series, from different starting point in time (May 2016 or Jan 2017) and have them on top of each other to compare the development of the values between the time series.

 

Med Venlig Hilsen,

 

Community Support Team
Community Support Team

Re: Plot two dataset from two different on the same axis

Hi @MemeGod ,

Can you please share a dummy file? If you can't, please share some sample data and your expected results that will make us understand clearly about your requirement.

 

Please see this post regarding How to Get Your Question Answered Quickly: 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,

Xue Ding

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors