Forum Discussion

tbobolz's avatar
tbobolz
Resolver I
2 years ago
Solved

Line Chart Visual omits days (x-axis point) without data - Seeking work around

Hi, seeking a solution to a minor formatting issue. My data source has a the folowing fields: category, date and volume. However, not all dates are represented in the source data, so when a line chart is created, there's in not a pin point on the x-axis for the missing dates in th esource. Meaning , it will display days  1   2   3   5  6  7, a long the X-axis but omit day 4. 

 

I have created a Calendar table using the funuction "Calendar = Calendarauto()" This a long with checking the option to "Show items with no data" on the field value. This force the missing day to appear, however the graph now has broken segments. 

 

Does anyone havea good work around for this issue?

 

Thanks Terry

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi tbobolz ,

     

    Thanks for the reply from AnalyticPulse , please allow me to provide another insight: 

     

    Based on your description, I created these data.


    1. created date table and created relationship between two tables.

     

    2. created measure.

    Measure =
    VAR _date = DISTINCT('Table 2'[Date])
    RETURN
    IF(MAX('Table'[date]) IN _date,MAX('Table'[value]),0)

     

    3. Put appropriate fields for the visual object.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

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

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi tbobolz ,

     

    Thanks for the reply from AnalyticPulse , please allow me to provide another insight: 

     

    Based on your description, I created these data.


    1. created date table and created relationship between two tables.

     

    2. created measure.

    Measure =
    VAR _date = DISTINCT('Table 2'[Date])
    RETURN
    IF(MAX('Table'[date]) IN _date,MAX('Table'[value]),0)

     

    3. Put appropriate fields for the visual object.

     

    If your Current Period does not refer to this, please clarify in a follow-up reply.

     

    Best Regards,

    Clara Gong

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

    • tbobolz's avatar
      tbobolz
      Resolver I

      Thanks Clara!!! This works great. Any way to keep the Zero plotted points from appearing for future date?

    • tbobolz's avatar
      tbobolz
      Resolver I

      Hi Clara,

      I just notice this formula only returns the MAX as your statement suggest. 

      IF(MAX('Table'[date]) IN _date,MAX('Table'[value]),0)

      My data table has multiple values on the same day, so the others are being ignored. I can't seem to figure out how to remove the "MAX" condition so that it reconize all values on the same day and adds them into the graph.

       

      Thanks for helping me learn!

      Terry

      Terry

       

    • tbobolz's avatar
      tbobolz
      Resolver I

      Thank you for th eresponse, I have tried several others with no success. I beleive it is because my data omits dates with no values. 

       

      Apprecaite the response!

      Terry