Forum Discussion

Seanan's avatar
Seanan
Solution Supplier
4 years ago
Solved

Include missing days in a line chart

I have a line chart that is displaying the total number of logins for each type of user each day. However, on weekends no users login to the system and therefore there will be no data for the weekend. The issue I'm having is that in my line chart instead of plotting the weekends as 0 the line chart skips those days and goes to the next day that there is data available. For example on the 10th of June there were 25 logins then it will skip June 11 and 12 and Jumps to June 13 where there are 13 logins.

 

I have 2 tables, the Event table which comes from a SQL Stored Procedure and then my Date Table.

 

The screenshot below is what it currently looks like. I've created a date table using the following code:

Date Table = CALENDAR("may 23 2022", "jan 1 2030")

 

 

 

 

 

 

 

 

 

The second image below is what I'd like the line graph to look like.

 

In my event table the EventDate column does not record data for the missing dates that's why I created the date table hoping it would include those missing dates.

 

Any help would be appreciated.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Seanan ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    IF(
        MAX('Table'[logins])=BLANK(),0,MAX('Table'[logins])
    )

    2. X axis – Type – Categorical in Format.

    3. Result:

     

    Best Regards,

    Liu Yang

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

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Seanan ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    IF(
        MAX('Table'[logins])=BLANK(),0,MAX('Table'[logins])
    )

    2. X axis – Type – Categorical in Format.

    3. Result:

     

    Best Regards,

    Liu Yang

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

    • Seanan's avatar
      Seanan
      Solution Supplier

      Anonymous Thank you for the help! It worked great 🙂