Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I have a report I'm building with a long list of employees, their start date, and end date. I have a slicer that is linked to a date table. I have created two measures based on the slicer:
/* First date in slicer:
Selected Value MIN = CALCULATE(MIN('DATE Dim'[DATE]),ALLSELECTED('DATE Dim'))
/* Second date in slicer:
Selected Value MAX = CALCULATE(MAX('DATE Dim'[DATE]),ALLSELECTED('DATE Dim'))
I am now looking to create a calculated column (I believe this is the only way, as it needs to be calculated per each row) that calculates the days worked within the slicer dates.
Hi, @boujarwah
Are you able to provide some of the example data? What kind of results do you expect, and can you show them in pictures? Although you can't create calculated columns based on measure, you may be able to achieve your needs in other ways.
Best Regards
Calculated columns are only calculated during data refresh so they don't take into account any slicers or filters. If you need something which reacts with slicers and filters you will need to create a measure, not a column.
You can turn your code for a calculated column into a measure by wrapping every column reference in SELECTEDVALUE().