Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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:

 

consulta 1.JPG

Thanks in advance

 

1 ACCEPTED SOLUTION

Hi @vixicai...what about this?...

 

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?

 

View solution in original post

6 REPLIES 6
v-xicai
Community Support
Community Support

Hi chromo4130,

 

You can create column Sum_Categorie.

 

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

 

2.png

 

 

 

 

 

Best Regards,

Amy

 

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

 

Anonymous
Not applicable

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 

Hi @vixicai...what about this?...

 

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?

 

Hi @vixicai...what about this?...

 

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?

 

mkeisha
Helper I
Helper I

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.

Anonymous
Not applicable

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 😞

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.