Files
Basalt2/node_modules/shiki/samples/dax.sample
Robert Jelic b0a4a6da9c Vitepress
2025-02-10 06:53:23 +01:00

20 lines
527 B
Plaintext

-- COALESCE returns the first non-blank of its arguments
-- It is commonly used to provide default values to expressions
-- that might result in a blank
EVALUATE
SELECTCOLUMNS (
TOPN ( 10, Store ),
"Store name", Store[Store Name],
"Manager",
COALESCE ( Store[Area Manager], "** Not Assigned **" ),
"Years open",
DATEDIFF (
Store[Open Date],
COALESCE ( Store[Close Date], TODAY () ),
YEAR
)
)
ORDER BY [Manager]
-- From https://dax.guide/coalesce/