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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
srasel
New Member

DAX formula to divide one row value with another particular row value

Hello All:

 

I need your help to figure out a DAX formula. I have a table in the left with columns - Project Name, Level 2 & Value. Now need to define a DAX measure to find the value of Gross Profit Margin. The rule is: for each group (Project Name), Gross Profit Margin = (Gross Profit value / Revenue value)

 

 

Query DAX.PNG

Thank you in advance.

 

Regards,

rasel

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @srasel,

Why not pivot the Level 2 column in Query Editor shown in the following screenshot and then create a new column using the following formula?

NewColumn = Table1[Gross Profit]/Table1[Revenue]

2.PNG

You can check the values of new column in the figure below, for more details, you can review the example in the attached PBIX file.
1.PNG

3.PNG

Thanks,
Lydia Zhang

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @srasel,

Why not pivot the Level 2 column in Query Editor shown in the following screenshot and then create a new column using the following formula?

NewColumn = Table1[Gross Profit]/Table1[Revenue]

2.PNG

You can check the values of new column in the figure below, for more details, you can review the example in the attached PBIX file.
1.PNG

3.PNG

Thanks,
Lydia Zhang

Hello @Anonymous:

 

Thank you! Restructuring the data like that will work I guess. Let me try that on my input set. Hope that will work there too.

 

Thank you once again. Really appreciat that.

 

Regards,

rasel

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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