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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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