ANY_VALUE function
Data Warehouse · General availability · Shipped
Description
Fabric Data Warehouse will introduce the ANY_VALUE() function.<br/>This function returns a value from a column within each group when all values in that group are the same, without requiring explicit aggregation logic like MIN() or MAX().<br/>It's ideal for scenarios where grouped columns contain identical values, and you simply need one of them for reporting or joining purposes.This makes queries cleaner and easier to write while preserving performance and correctness.<br/>
```SELECT c.CustomerID, ANY_VALUE(c.FirstName + ' ' + c.LastName) AS CustomerName, ANY_VALUE(c.CompanyName) AS Company, ANY_VALUE(c.EmailAddress) AS Email, ANY_VALUE(c.Phone) AS Phone, COUNT(soh.SalesOrderID) AS OrderCountFROM SalesLT.Customer AS cJOIN SalesLT.SalesOrderHeader AS soh ON c.CustomerID = soh.CustomerIDGROUP BY c.CustomerID;```
Change History
-
2026-03-26
Release Date 2026-03-31 -> 2026-03-23Release Status Planned -> Shipped -
2026-01-29
Release Type Public preview -> General availability -
2026-01-26
Feature Description Fabric Data Warehouse will introduce the ANY_VALUE() function.This function returns a value from a column within each group when all values in that group are the samewithout requiring explicit aggregation logic like MIN() or MAX().It's ideal for scenarios where grouped columns contain identical valuesand you simply need one of them for reporting or joining purposes.This makes queries cleaner and easier to write while preserving performance and correctness.<br/> ```SELECT c.CustomerIDANY_VALUE(c.FirstName + ' ' + c.LastName) AS CustomerNameANY_VALUE(c.CompanyName) AS CompanyANY_VALUE(c.EmailAddress) AS EmailANY_VALUE(c.Phone) AS PhoneCOUNT(soh.SalesOrderID) AS OrderCountFROM SalesLT.Customer AS cJOIN SalesLT.SalesOrderHeader AS soh ON c.CustomerID = soh.CustomerIDGROUP BY c.CustomerID;``` -> Fabric Data Warehouse will introduce the ANY_VALUE() function.<br/>This function returns a value from a column within each group when all values in that group are the samewithout requiring explicit aggregation logic like MIN() or MAX().<br/>It's ideal for scenarios where grouped columns contain identical valuesand you simply need one of them for reporting or joining purposes.This makes queries cleaner and easier to write while preserving performance and correctness.<br/> ```SELECT c.CustomerIDANY_VALUE(c.FirstName + ' ' + c.LastName) AS CustomerNameANY_VALUE(c.CompanyName) AS CompanyANY_VALUE(c.EmailAddress) AS EmailANY_VALUE(c.Phone) AS PhoneCOUNT(soh.SalesOrderID) AS OrderCountFROM SalesLT.Customer AS cJOIN SalesLT.SalesOrderHeader AS soh ON c.CustomerID = soh.CustomerIDGROUP BY c.CustomerID;``` -
2026-01-26
Roadmap Item Added
Workload: Data Warehouse