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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Multiplying rows together only if they meet a particular criteria - Working out M2 using two columns

Hi All,

Pretty new to Power BI. Basicall I am trying to get a M2 summary using CM of Height and Width. The CM are in a Value column along with a heap of other data. I have a Label ID column that runs along this. 

I have a column that holds multiple label IDs that also hold the IDs for Height and Width. The image below shows 1171 and 1170 as Width and Height in the jobtype_fileld_id column along with the Value (which is in cm). 

Capture.JPG

I am trying to make a M2 column first of all. This in Excel would be simply making two new fields with the filtered data then multiplying those two fields together then dividing it by 10000. 


Any help would be awsome.
Many Thanks in Advance

1 ACCEPTED SOLUTION
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

use Power Query (Transform data) for this.

Mark the field jobtype_fileld_id and press pivot column.

20191122_pivot.png

 

20191122_pivot_2.png

 

Than calculate your Custom Column

20191122_calculate.png

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

3 REPLIES 3
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

use Power Query (Transform data) for this.

Mark the field jobtype_fileld_id and press pivot column.

20191122_pivot.png

 

20191122_pivot_2.png

 

Than calculate your Custom Column

20191122_calculate.png

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

Hi @mwegener,

 

Thanks for that. It definitely did the job.


However, as it has split up all the rows it has kept the same number of Job ID Rows. So subsequently I can't just go col A * col B. Do you have a quick solution for grouping these together. I tried the "Group" function. But this made separeate tables rather than removing excess rows or compressing the rows to Job Id.

Many Thanks in advance

Rob

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

reduce first the query to these three columns job_id, jobtype_field_id and value, 

then you should get only one row for each job_id.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors