Forum Discussion
Referring Same Column - Previous Value
- 1 year ago
Hi Sandeep_1992 ,
Thanks for reaching out to the Microsoft fabric community forum
To help us understand your issue better, please share sample data that clearly shows the problem (in text or table format, not a screenshot), without including any sensitive or unrelated information, and also show the expected result based on that data. If possible, share the PBIX file as well, provided it doesn’t contain any sensitive information.
Looking forward to your response.
Best Regards,
Lakshmi Narayana
Hi Sandeep_1992
In Power BI, when you try to create a table that simulates incremental changes (like ±5 steps) of a measure such as [Cost], it's important that the measure respects the filters applied in the report—especially date filters. In your original DAX expression, you define BaseCost as a variable outside of the row context of the ADDCOLUMNS function. This causes [Cost] to be evaluated once in a broader context, ignoring any filters such as dates selected by the user. As a result, the simulated cost values remain static regardless of the date slicer changes. To make the [Cost] measure respond to filters like dates, you need to calculate it inside the row context of the virtual table. This can be done by using the CALCULATE function within ADDCOLUMNS, which re-evaluates the [Cost] measure in the context of each row generated by GENERATESERIES. By moving the measure calculation inside and wrapping it with CALCULATE, you ensure that each simulated cost dynamically reflects the correct value according to the current report filters. This makes your simulation accurate and interactive, adjusting properly as users apply slicers or filters to the visual.