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

Help with Dividing two categories in a single data column

Capture.JPGPlease see screenshot.  This is a matrix table.  I wish to divide 'engaged' by 'reached'.  However these are categories and all share the same 'value' column.  So how do I do this?  i.e. the logic needs to be division where value=engaged / where value = reached.  Please help! Thanks  

3 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @Anonymous ,

 

You need to create a measure with the following syntax:

 

% Engaged/reached CALCULATE(SUM(Table1[Value]);Table1[Type] = "Engaged")/ CALCULATE(SUM(Table1[Value]);Table1[Type] = "Reached")

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Anonymous
Not applicable

Thanks, this got me on the right track.  I had to insert apostropes though around table names and also replace your semi colons with commas.  So the correct result was:

ER% = CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Engaged")/ CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Reached") 
 

 

View solution in original post

Hi @Anonymous ,

 

You must reduce the size of the columns you want to hide, be carefull to turn off word wrap on columns title and values.

 

This is a workaround but is the way to achieve your goal.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @Anonymous ,

 

You need to create a measure with the following syntax:

 

% Engaged/reached CALCULATE(SUM(Table1[Value]);Table1[Type] = "Engaged")/ CALCULATE(SUM(Table1[Value]);Table1[Type] = "Reached")

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Thanks, this got me on the right track.  I had to insert apostropes though around table names and also replace your semi colons with commas.  So the correct result was:

ER% = CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Engaged")/ CALCULATE(SUM('Data 2019'[Value]),'Data 2019'[KPI] = "Reached") 
 

 

Hi @Anonymous ,

 

That question about the commas and the names of the tables as to do with the regional settings on the computer it's a normla thing.

 

Glad I could help.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Also now I have imlemented this, it creates another issue - the measure appears behind every column but I only want it to appear once - how could I adjust this? Capture.JPG

Hi @Anonymous ,

 

You must reduce the size of the columns you want to hide, be carefull to turn off word wrap on columns title and values.

 

This is a workaround but is the way to achieve your goal.

 

Regards,

MFelix


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

Ok understand, sorry about that.  Have remarked as yours.  At least we have both regional solutions now 😉

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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