Forum Discussion

Mikekeji1978's avatar
Mikekeji1978
Regular Visitor
1 year ago
Solved

Multiple line chart visualisation

How do you create multiple daily time series plots on one graph in powerbi? E.g Mean daily riverflow data of multiple years on one graph in Power BI. Where the daily average flow data is on the y-axis and the date on x- axis. Overall, comparing last year to this year, but for daily mean data. thanks

  • The issue has been resolved following one of the responses given. Many thanks

7 Replies

  • Hi Mikekeji1978 

     

    First, you need a Calendar/Date table, then you just have to use some Time

    intelligence function

    If you do not have one, you can create one calculated table with Calendarauto() function

     

    For example with DateADD

     

    Average Flow X Years Ago =
    CALCULATE (
    AVERAGE('RiverFlowData'[FlowValue]), -- Or your base daily mean measure logic
    DATEADD('Dates'[Date], -X, YEAR)
    )

     

    You just have to replace X by how many years ago you need to compare

    And of course, you can create this measure many time as you need and add all of them on the y-axis of your chart

    • Mikekeji1978's avatar
      Mikekeji1978
      Regular Visitor

      Not sure if i will need the average function because I just want to use the time series as it. I am not calculating any average. I will go for the base daily mean measure logic. I will try that. Thank you.

  • Mikekeji1978's avatar
    Mikekeji1978
    Regular Visitor

    Great! I will give it a try. I am a hydrologist. Trying to compare multiple daily mean time series from 1975 to 2025 for flow recession analysis in Power. Thank you so much

  • Hi Mikekeji1978 ,
    To create multiple daily time series plots on one graph in Power BI, you can use a Line Chart visualization. First, ensure your data includes fields like Date, Year, and Mean Daily Flow. You’ll need to create a new column that extracts just the Month and Day from your Date field (ignoring the year), so you can align daily values from different years on the same x-axis.

     

    You can create this column in Power Query or DAX, for example using FORMAT([Date], "MM-DD"). Then, plot the new Month-Day column on the x-axis, Mean Daily Flow on the y-axis, and use Year as the Legend to create separate lines for each year. This way, you’ll be able to compare daily riverflow patterns across different years on a single chart. Make sure to set the x-axis to be "Categorical" instead of continuous to properly display all dates without aggregation issues.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Mikekeji1978,

     

    we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
    If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.

     

    Regards,
    Vinay Pabbu

  • Mikekeji1978's avatar
    Mikekeji1978
    Regular Visitor

    The issue has been resolved following one of the responses given. Many thanks

    • Anonymous's avatar
      Anonymous
      Not applicable

      Mikekeji1978, Glad your issue has been resolved!
      I suggest you to accept Super user post as the solution — it will help other community members facing similar problems to find the answer faster.

       

      Regards,

      Vinay