Forum Discussion

monaco88's avatar
monaco88
New Member
3 years ago
Solved

Adding aliases

Hi,

I'm trying to add the alias "ItemID".... for 'Items'[ItemID].... to the below query:  I know this should be straightforward but I've been looking at this for some time and unable to figure it out.  Thanks in advance!

 

EVALUATE
  FILTER(
    SUMMARIZE(
    'Items',
    'Items'[ItemID],
    "Cost", SUM('Items'[Cost])
  ),
  [Cost] > 10
)

  • Hi monaco88 

    please try

    EVALUATE
    SELECTCOLUMNS (
    FILTER (
    SUMMARIZE ( 'Items', 'Items'[ItemID], "Cost", SUM ( 'Items'[Cost] ) ),
    [Cost] > 10
    ),
    "NewName", [ItemID],
    "Cost", [Cost]
    )

3 Replies

  • eliasayyy's avatar
    eliasayyy
    Memorable Member

    EVALUATE

    SELECTCOLUMNS (

      'Items',

        "item ID", 'item'[item Id],

    )

    This will help you name an alias

  • tamerj1's avatar
    tamerj1
    Community Champion

    Hi monaco88 

    please try

    EVALUATE
    SELECTCOLUMNS (
    FILTER (
    SUMMARIZE ( 'Items', 'Items'[ItemID], "Cost", SUM ( 'Items'[Cost] ) ),
    [Cost] > 10
    ),
    "NewName", [ItemID],
    "Cost", [Cost]
    )