Skip to content

Instantly share code, notes, and snippets.

@malinxiao
Last active December 11, 2017 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malinxiao/15103941da0bc705b80025f8f68c308f to your computer and use it in GitHub Desktop.
Save malinxiao/15103941da0bc705b80025f8f68c308f to your computer and use it in GitHub Desktop.
Product Category Title =
IF (COUNT('SalesLT ProductCategory'[Product Category])=1,
VALUES('SalesLT ProductCategory'[Product Category]),
IF (COUNT('SalesLT ProductCategory'[Product Category])=
CALCULATE(COUNT('SalesLT ProductCategory'[Product Category]),
All('SalesLT ProductCategory'[Product Category])),
"All Categories Selected",
MIN('SalesLT ProductCategory'[Product Category]) & " and the other "
& COUNT('SalesLT ProductCategory'[Product Category])-1 & " categories"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment