Forum Discussion

rcardenasbc's avatar
rcardenasbc
Frequent Visitor
2 years ago
Solved

Line graph with solid and dotted lines

Hello, I need a lot of help, I want to make a line graph where the x axis are the months of the year and the y axis are 3 values, but I don't know how to make the lines appear dotted starting from th...
  • mark_endicott's avatar
    2 years ago

    You can use 2 measures for this. I have taken your sample data and made the below:

    My two measures are as follows, starting with Previous Months:

    VAR month_now =
        MONTH ( NOW () )
    VAR calc =
        CALCULATE ( SUM ( 'Table'[Data 1] ), KEEPFILTERS ( 'Table'[Month Number] < 5 ) )
    RETURN
        calc

    The next one does current and future months:

    VAR month_now =
        MONTH ( NOW () )
    VAR calc =
        CALCULATE (
            SUM ( 'Table'[Data 1] ),
            KEEPFILTERS ( 'Table'[Month Number] >= month_now )
        )
    RETURN
        calc

    Once you have put the two measures in the Y-Axis of the chart, you can set the Line settings for the Current Month Line differently:

     

    If this works, please mark this as the solution.