Forum Discussion

AnAnalyst's avatar
AnAnalyst
Icon for Helper III rankHelper III
4 years ago

Multiple Specific Years in one line chart

Standard Fact and Dimensions data model

value = Sum(_value)

X axis = date

 

Current Year = CALCULATE(value)

Prior Year = CALCULATE(value, SAMEPERIODLASTYEAR(dates[date]))
Specific Year = ?? something like CALCULATE(value, dates[year] = 1995) 

 

I want the specified year to act the same at the prior year measure where the value of 1/1/1995 shows on the 1/1/2021 x axis value.

 

4 Replies

  • themistoklis's avatar
    themistoklis
    Icon for Community Champion rankCommunity Champion

    AnAnalyst 

     

    If I understand correctly you want all the lines that will be plotted on the map to have the same starting point.

     

    To achive that drag the date field to both Axis and Legend section of the line chart

     

    For axis section select from the hierarchy e.g the Month (not Date, or Day....)

    and for Legend section  select from the hierarchy the Year 

     

    For values just add the value field

    • AnAnalyst's avatar
      AnAnalyst
      Icon for Helper III rankHelper III

      This is very close except:

      1. I can't have multiple measures as the values in this scenario (1995, overall Average, Current Year, Prior Year)

      2. We lose the continuous axis if we want to see the day level detail

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi AnAnalyst ,

        Based on your description, it seems that you are trying to display data from different years based on the same X axis. Please see if the following threads can help you get the results you want. If you can't have multiple measures, maybe they are not a good solution for you...

        Merge/Overlay two line charts

        Year over Year in line chart

        Best Regards