Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamic Reference Line

I have a line graph showing trend lines for prices of multiple commodities. I need a vertical reference line (dynamic) on this graph to differentiate between the current and forecast values on the X-...
  • v-yingjl's avatar
    5 years ago

    Hi Anonymous ,

    You can create measure to calculate specific period values and show it in the line chart:

    Measure = 
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            'Table',
            'Table'[Category]
                IN DISTINCT ( 'Table'[Category] )
                    && 'Table'[Date].[MonthNo] >= MONTH ( TODAY () )
                    && 'Table'[Date].[MonthNo]
                        <= MONTH ( TODAY () ) + 1
        )
    )

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.