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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Dax formula for Percent of row total of sum values

Hello,

 

I'm trying to reproduce the following excel in dax so I can reproduce blended cost in another matrix visual.

 

I'm using a matrix visual

 

Knoble_0-1724170313705.png

% of total bikes

410/5,434 = 8 %

Blended cost

8 % * 42.34 = 3.19

 

I did find a dax formula but it was for count and the count of bikes is actually a sum. 

 

Thank you in advance.

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Anonymous ,

I create a table as you mentioned.

vyilongmsft_0-1724205948838.png

Then I create a measure and here is the DAX code.

Measure = SUM('Table'[LTL Count of Bikes])/SUM('Table'[Total Count of Bikes.1])*SUM('Table'[LTL Cost/Bike])

vyilongmsft_1-1724206185509.png

 

 

 

Best Regards

Yilong Zhou

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

Anonymous
Not applicable

Hello,

The dilemna is that the table I provided is a sum of a larger dataset. And the Total Count of Bikes is a sum of the three Types. The % of Total Bikes is dividing the count of one type from the overall total. (ex: 410/5434 = 8 %) and the Blended cost is multiplying the Cost/Bike from one type by the % of total bikes (ex: 42.34 * 8 % = 3.19). 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors