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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Mounika1
Frequent Visitor

Create a Sum of a Measure for each category in the tables

measure sum.png

I have to get the Output for each category in the below way

 

Output.png

8 REPLIES 8
v-qiuyu-msft
Community Support
Community Support

Hi @Mounika1,

 

You can try to create a measure use SUMX() like below:

 

TotalPerCategory= SUMX(ALLEXCEPT('Table',Table[Category]),'Table'[Measure])

 

If above measure doesn't work, please share the DAX or Measure you already created, and the raw data behind of the Measure. Perhaps we can create a measure based on raw data directly without using the Measure.

 

Best Regards,
QiuyunYu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Mounika,

 

I don't know if i fully understand your problem, but this is basically default functionality when your Measure column is numeric and you drag it onto the canvas with the category. What Power BI does is that an implicit measure is created for this visual.

 

If you want to re-use the calculation than create a measure like:

Value = SUM(Table[Measure])

sum.JPG

 

 

Hi @Anonymous

 

If i am using the SUM function the Measure of that table doesn't come in the suggestion. Only the columns are displayed.

 

Anonymous
Not applicable

Can you share a screenshot? Don't really get what you mean.  To make a measure for the Measure column you should define a New measure with the syntax NAME = SUM(Table[Measure])

For SUM function i cannot take a measure inside it..like SUM(Table(Measure)..measure.png

In the above image, in the dropdown it doesnot show Measures. To do sum of Measures.

Anonymous
Not applicable

In your example there is a column with the name "Measure".... so that should be in your table.

 

In the SUM() specify the column that you want to summarize.

Measure is not the column name. Its the measure created using columns of a table.

Anonymous
Not applicable

Are you trying to do a sum over a measure? Why?

 

You have a measure defined that does a SUM of a column in a table right? So if your table has a column with the name Value the definition for the measure = SUM(Table1[Value]) right?

 

I don't understand why you want to do a SUM over that measure, because the measure actually is a SUM...

 

So dragging the measure onto the canvas with the Category that holds Buses and Cars will deliver the result you asked for and was displayed in my first reaction.  

 

If this is still not what you are looking for please try to share a pbix and a clear description of your needs.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.