Forum Discussion
Measure with Disconnected Table as Filter
Hello - when a table is used in the VALUES function a table with the same columns is returned. When a column is used in the VALUES function a single column table is returned. LeaveDaysDynamic is calculating the leave days for each unique value from the [DET_NUMBER] of the EMLAC table with the min/max specified whereas LeaveSummaryDaysDynamic is being fed a table with multiple columns as it's basis. Is the DET_NUMBER field also available on the summary table? If so, you can use it inside VALUES.
Documentation
https://docs.microsoft.com/en-us/dax/values-function-dax
Return value
When the input parameter is a column name, a single column table. When the input parameter is a table name, a table of the same columns is returned.
Remarks
When you use the VALUES function in a context that has been filtered, the unique values returned by VALUES are affected by the filter. For example, if you filter by Region, and return a list of the values for City, the list will include only those cities in the regions permitted by the filter. To return all of the cities, regardless of existing filters, you must use the ALL function to remove filters from the table. The second example demonstrates use of ALL with VALUES.
This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.
For best practices when using VALUES, see Use SELECTEDVALUE instead of VALUES.