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

find the largest value from two columns by category/row in Power BI desktop

Hi all, I am reasonably new to power bi and was hoping for some help creating a new column (with dax) to find the largest value per category/row from two columns.

Below is an example of my data now. The two columns I want to compare to find the largest value per Category/row is Sales forecast and sales quantity.

Item Code.sales forecast.sales quantity.
a2030
b105
c5060
d8070
e510

 

Below is what I would like my table to look like

item code.sales forecast.sales quantity.Required Stock Level.
a203030
b10510
c506060
d807080
e51010

 

If anyone can help that would be very much appreciated. 

 

Thank you

1 ACCEPTED SOLUTION
Shahfaisal
Solution Sage
Solution Sage

IF( [sales forecast] > [sales quantity], [sales forecast], [sales quantity] )

 

Is this what you are looking for?

View solution in original post

2 REPLIES 2
Shahfaisal
Solution Sage
Solution Sage

IF( [sales forecast] > [sales quantity], [sales forecast], [sales quantity] )

 

Is this what you are looking for?

Anonymous
Not applicable

YES!! thats perfect thank you

Helpful resources

Announcements
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