Forum Discussion

Giada90's avatar
Giada90
Icon for Helper IV rankHelper IV
4 years ago
Solved

dax formula for column

Hi,

I need to make a new COLUMN that shows the aggregated value of sales based on a city ( as a result I need to see the total number of sales fot each city for example for city Allen I need to see 290.21)

How can I do?

Thanks

 

 

  • Giada90 ,

     

    new column =

    sumx(filter(Table, Table[City] = earlier(Table[City]) ), [Sales])

     

    or

     

     

    new measure=

    sumx(filter(allselected(Table), Table[City] = max(Table[City]) ), [Sales])

1 Reply

  • Giada90 ,

     

    new column =

    sumx(filter(Table, Table[City] = earlier(Table[City]) ), [Sales])

     

    or

     

     

    new measure=

    sumx(filter(allselected(Table), Table[City] = max(Table[City]) ), [Sales])