Forum Discussion
dynamic line chart
Hi burakkaragoz , grazitti_sapna
i would like to acheive below functionality as an example
Line Chart showing Sales by Year Month:
Let say I selected 2021-09 then below should be the output
Let say if select outside the line then chart should reset to show all sales
- v-hashadapu1 year agoCommunity Support
Hi powerbiexpert22 , Thank you for reaching out to the Microsoft Community Forum.
In Power BI, clicking a data point on a line chart just highlights it without filtering the data model, so our DAX logic for showing the selected month and the two previous ones doesn’t work. Use a slicer tied to a Month Selector table. This way, you can pick a month and the chart will automatically show that month plus the two before it. If you clear the slicer, the chart goes back to showing all months. Or you could use a table or matrix visual with the same month selector as a clickable filter to get the same result.
Please refer attached .pbix file for reference and share your thoughts.
If this helped solve the issue, please consider marking it “Accept as Solution” and giving a ‘Kudos’ so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.