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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount 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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors