cancel
Showing results for
Did you mean:
Highlighted
chromo4130 Regular Visitor

## Sum by categories which are in the same column

Hi,I need to create measures that allows me to sum by categories...this is the escenario: 1 ACCEPTED SOLUTION

Accepted Solutions
christianfcbmx Member

## Re: Sum by categories which are in the same column

I like what you did but he needs something like this I guess:

`A SUM Categories = CALCULATE(SUM(Table1[US DOLLARS]);Table2[Category]="A")`

what do you think?

6 REPLIES 6
mkeisha Frequent Visitor

## Re: Sum by categories which are in the same column

Hi do you already have a Sales table and a Categories table that have a relationship created?  Can't tell from what you've provided.

Thanks.

chromo4130 Regular Visitor

## Re: Sum by categories which are in the same column

there is only one table....I need to sum the USD considering "AA" category and ignoring the others categories in the column.

Ive seen it before...but I cant find the dax v-xicai Super Contributor

## Re: Sum by categories which are in the same column

Hi chromo4130,

You can create column Sum_Categorie.

Sum_Categorie = CALCULATE(SUM(Table1[US DOLLARS]),FILTER(ALLSELECTED(Table1),Table1[Categorie]=EARLIER(Table1[Categorie]))) Best Regards,

Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

christianfcbmx Member

## Re: Sum by categories which are in the same column

I like what you did but he needs something like this I guess:

`A SUM Categories = CALCULATE(SUM(Table1[US DOLLARS]);Table2[Category]="A")`

what do you think?

christianfcbmx Member

## Re: Sum by categories which are in the same column

I like what you did but he needs something like this I guess:

`A SUM Categories = CALCULATE(SUM(Table1[US DOLLARS]);Table2[Category]="A")`

what do you think?

chromo4130 Regular Visitor

## Re: Sum by categories which are in the same column

Such an smart solution, but @christianfcbmx  made what I needed...at the end I needed a DAX for each letter to get VAR between them....Ill learn from what you do though it is so useful as well....thankt u so much @v-xicai