Forum Discussion
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-axis of this graph. (For example, if I am viewing the graph in January 2021, the line should be placed between January and February 2021)
Using a combination chart is not working.
Is there any other way to achieve this?
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.
3 Replies
- lbendlinSuper User
create a measure that computes this, and add it to the visual values
- parry2kSuper User
Anonymous Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490 - v-yingjlCommunity Support
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.