Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I would like to identify the minimum data in a table while considering also the date range selected by a slicer.
As a measure the following code provides the expected result.
FirstDateSelected =
calculate(
min(Data[Date]),
ALLSELECTED(Data[Date])
)
However, the same code does not work with a calculated column, I'm assuming because of the automatic row context of calculated columns.
I tried
FirstDateSelectedCalculatedColumn =
calculate(
min(Data[Date]),
allselected(Data)
)
in a calculated column, it seems to ignore the row context but does not consider anymore the selected dates in the slicer.
How can I ignore the row context keeping the filter context in a calculated column?
Thanks in advance
Solved! Go to Solution.
Hi,
Calculated column formulas do not respond to changes in slicers. Calculated columns are recalculated only when you press Refresh.
Hi @ITManuel
A calculated column is computed when it's created and during data refresh. Then the column results are stored in the data model. It does not depend on user interaction in the report such as filters, slicers and so on.
If you want to get different results based on slicers, you should use measures rather than calculated columns. See more differences between them and when to use each one:
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
https://blog.enterprisedna.co/power-bi-calculated-column-vs-measure-a-comparison/
Regards,
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.
Hi,
Calculated column formulas do not respond to changes in slicers. Calculated columns are recalculated only when you press Refresh.
@ITManuel you need to add another disconnected table for the slicer and then use that to get the minimum date.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |