target line
1 TopicAdding Target Line for 2023 Cumulative Costs in Power BI Visual
Hello Power BI Community, I am seeking assistance with a visual I've created to compare cumulative costs for the years 2022 and 2023. For the visual, I have developed the following measure for cumulative costs: ```DAX Cumulative Costs = CALCULATE( SUM('Cost 1'[Amount EUR]), FILTER( ALL('Calendar'[Date]), // Remove the filter context from the Calendar table YEAR('Calendar'[Date]) = YEAR(MAX('Calendar'[Date])) && MONTH('Calendar'[Date]) <= MONTH(MAX('Cost 1'[Date])) ) ) ``` This measure is placed on the Y-axis, with the Calendar Month on the X-axis, and the Calendar Year as the legend. My query is about incorporating a target line for 2023 cumulative costs into this visual. Currently, the use of the legend for differentiating between the years is preventing me from adding a secondary Y-axis. Is there a way to work around this issue? Should I create a separate measure to facilitate the addition of the target line? I have attached a sample of the data and a screenshot of the visual for your reference. Any guidance you can provide would be greatly appreciated. Sample Visual and sample Dataset Attached: https://drive.google.com/drive/folders/1IOviSSW_LKRWuyKH_R7Gh6RaDDj6_zZV?usp=sharing Best Regards, Manish Tripathi945Views0likes2Comments