Forum Discussion
dynamic reference line
- 4 months ago
Hi khadijabl2000 ,
Thanks for sharing the screenshot that really helps. The reason your reference line is still showing 1M even after selecting New York is likely because the measure behind the line is removing the filter context, usually due to the use of ALL or a similar function. When ALL is used it ignores slicers like City so the line does not respond to your selection. To fix this you will need to update the measure so it respects the filter context.
For example Line Value = AVERAGE Sales Amount or using CALCULATE without removing filters. Also make sure you have applied the measure using the fx button in the Analytics pane instead of entering a static value. Once updated the reference line should dynamically adjust when you select different cities like New York or Boston.
Please find the attached .pbix file for your reference.
Thank you.
What doesn't work? I can see that the reference line is at 1M which is true because you haven't selected New York.
here you can see that. when i select new york the line still in 1M. my bad I didn't send this screen earlier.
- v-sshirivolu4 months agoCommunity Support
Hi khadijabl2000 ,
Thanks for sharing the screenshot that really helps. The reason your reference line is still showing 1M even after selecting New York is likely because the measure behind the line is removing the filter context, usually due to the use of ALL or a similar function. When ALL is used it ignores slicers like City so the line does not respond to your selection. To fix this you will need to update the measure so it respects the filter context.
For example Line Value = AVERAGE Sales Amount or using CALCULATE without removing filters. Also make sure you have applied the measure using the fx button in the Analytics pane instead of entering a static value. Once updated the reference line should dynamically adjust when you select different cities like New York or Boston.
Please find the attached .pbix file for your reference.
Thank you.- khadijabl20004 months agoFrequent Visitor
Hi v-sshirivolu,
Thank you very much for your help. I used ALLSELECTED and it did work.
Best regards,
Khadija
- v-sshirivolu4 months agoCommunity Support
Hi khadijabl2000 ,
Glad to hear that using ALLSELECTED worked for your scenario.
Thanks for confirming. Feel free to reach out if you need any further assistance.
Best regards,
Sreeteja.
Community Support Team.