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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Using Column Total in Metrics

Hi I have below metrics data

srlabhe123_0-1658262136227.png

Here I need another measure as TotalOrders so that it shows 71 for all Complaint codes for Less Than 1 Hr and so on for rest of the buckets.

Actually I wanted to create a % of orders for Complaint in a bucket so here for Arrived Warm for Less than 1 hr it would be 6/71 i.e 8.45%

Same way for Product Damaged/Crushed for less than 2 Hrs it woudl be 9/49 i.e. 18.43%

 

Your guidance is appreciated, kindly note this is metrics where columns are Buckets and rows are Complaint Notes.

 

Thanks

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Test the below :

create a new table2:

Table2 = SELECTCOLUMNS('Table',"VarCompCode",'Table'[VarCompCode],"Type",'Table'[Type]&" "&"%","value",'Table'[value]/CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Type]=EARLIER('Table'[Type]))))

Then union the two table:

Table3 = UNION('Table',Table2)

Fianl create the below visual:

vluwangmsft_0-1658480058081.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

View solution in original post

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

Hi @Anonymous ,

Test the below :

create a new table2:

Table2 = SELECTCOLUMNS('Table',"VarCompCode",'Table'[VarCompCode],"Type",'Table'[Type]&" "&"%","value",'Table'[value]/CALCULATE(SUM('Table'[value]),FILTER(ALL('Table'),'Table'[Type]=EARLIER('Table'[Type]))))

Then union the two table:

Table3 = UNION('Table',Table2)

Fianl create the below visual:

vluwangmsft_0-1658480058081.png

Did I answer your question? Mark my post as a solution!


Best Regards

Lucien

Ashish_Mathur
Super User
Super User

Hi,

Assuming the numbers there are a result of a measure, write this measure

% of total = divide([your measure],calculate([your measure],all(Data[Complaint Notes])))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.