Forum Discussion
If Statement for Dates Between
It is not possible for a slicer to affect a calculated column, so you'd need to use a measure instead.
However, it's not clear to me how exactly you'd be using such a measure, so I'd need more context to understand know how to write it.
Since adding dynamic vertial lines is, for whatever reason, incrediablly difficult; I was hoping I could create a column that dynamically calculated against my calendar if a particual day was an event day or not. In this way I could use that column as a legend and highlihgt that portion of my line visual as an event. So, maybe there is another way to go about this?
- v-jingzhang5 years agoCommunity Support
Hi Anonymous
The data in a calculated column is populated and refreshed when it is created or when the dataset is refreshed. It cannot be dynamically changed accroding to users' interactions in the report. That means it cannot be influenced by the slicers and filters in the report. So you should use a measure to realize that.
You say you want to use that column as a legend, do you want something like a line chart with two lines (one for "Event" and the other for "No Event")? Not clear about the expected result you want. Maybe you can refer to below articles:
Dynamic Legend in #Power BI Visual, Line Chart - Prathy's Blog
DAX Measure in the Axis of the Power BI Report - RADACAD
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.