Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

  • 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.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      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,