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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Using MAX in an IF statement

Hi all,

 

Im very new to this, this is my first post.

 

I am having some issues with an IF statement where I am trying to find the MAX value from 5 different columns, where the column is the MAX I want it to return different text. Most of the outputs from my new column  are correct but some of them are not and I cannot figure out why as it works on most?

 

Here is my formula.

 

1 Strategic Priority 2 = if('pbi_table'[Strategic Score]=0,"Not Assigned",
2 if(MAX(pbi_table[Closer Score],MAX(pbi_table[Growth Score],MAX(pbi_table[Proud Score],MAX(pbi_table[£ Score],MAX(pbi_table[Transform Score])))))=pbi_table[Closer Score],"Closer",
3 if(MAX(pbi_table[Closer Score],MAX(pbi_table[Growth Score],MAX(pbi_table[Proud Score],MAX(pbi_table[£ Score],MAX(pbi_table[Transform Score])))))=pbi_table[Growth Score],"Growth",
4 if(MAX(pbi_table[Closer Score],MAX(pbi_table[Growth Score],MAX(pbi_table[Proud Score],MAX(pbi_table[£ Score],MAX(pbi_table[Transform Score])))))=pbi_table[Proud Score],"Proud",
5 if(MAX(pbi_table[Closer Score],MAX(pbi_table[Growth Score],MAX(pbi_table[Proud Score],MAX(pbi_table[£ Score],MAX(pbi_table[Transform Score])))))=pbi_table[£ Score],"Cap",
6 if(MAX(pbi_table[Closer Score],MAX(pbi_table[Growth Score],MAX(pbi_table[Proud Score],MAX(pbi_table[£ Score],MAX(pbi_table[Transform Score])))))=pbi_table[Transform Score],"Transform",
7 "Investigate"))))))

 

Any help would be much appreciated.

2 REPLIES 2
vivran22
Community Champion
Community Champion

Hello

Welcome to the Power BI Community.

Is it possible to share the sample data along with the desired output? The requirement is not very clear from your current post.

Thanks!

Vivek
Anonymous
Not applicable

I cant see how to attach an excel file so I have added a sample in th etable below. Columns B-F are provided a score. Column G (Top Score) is a MAX calculation of Range B-F. Then Priority is an IF statement using MAX. It is very easy to do this in excel but I am trying to recreate this in power BI and I do not obtain the same results.

 

There is another slight issue in that on occassion the MAX number is matched between columns, then I need to figure out what to do in that scenario.

 

Title£ ScoreTrans ScoreCloser ScoreProud scoregrowth scoreTop scorePriority
115080015Top Score
2152000020Trans Score
300520020Proud Score
4201500020£ Score
5000000Not Assigned

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.