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
harshagraj
Post Partisan
Post Partisan

Calculated column to change Names

Hi all, Please find the below table. I need a calculated column and below is the requirement.

If the Gate is G3 and Recommendation is Approve The Gate remais same I,e G3.
If after G3 when the project moves to G4 and if Recommendation is Interim Review then G4 becomes G3 and the previous G3 becomes G2.
and same happens If G3 is Approve and If G4 is Approve and G5 is Interim Review then G5 becomes G4 and G4 becomes G3 and G3 becomes G2..
Please help me with this.

 

project_numberGateTypeRecommendationDates

PRJ-14G3Custom FieldApprove02-03-2016 00:00
PRJ-14G3Custom FieldInterim Review16-02-2016 00:00
PRJ-14G3ScheduleApprove02-03-2016 00:00
PRJ-14G3ScheduleInterim Review16-02-2016 00:00
PRJ-14G4Custom FieldInterim Review10-05-2016 00:00
PRJ-14G4Custom FieldInterim Review08-07-2016 00:00
PRJ-14G4Custom FieldInterim Review16-08-2016 00:00
PRJ-14G4ScheduleInterim Review10-05-2016 00:00
PRJ-14G4ScheduleInterim Review08-07-2016 00:00
PRJ-14G4ScheduleInterim Review16-08-2016 00:00
PRJ-14G4ScheduleInterim Review03-04-2018 00:00
PRJ-14G4ScheduleInterim Review12-10-2018 00:00
PRJ-14G4ScheduleInterim Review27-02-2020 00:00
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @harshagraj ,

You can create one calculated column as below:

Calculated = if('Table'[Recommendation]="Approve",'Table'[Gate],CALCULATE(max('Table'[Gate]),FILTER('Table','Table'[Gate]<EARLIER('Table'[Gate]))))

Best Regards

Rena

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @harshagraj ,

What is your expected result? Whether the field "Updated_Gate" in below screen shot is the result what you desired?expected result.JPG

Best Regards

Rena

Hello @yingyinr thank you for the answer. Yes, it's right, I need a separate column. Thank you in advance.

Anonymous
Not applicable

Hi @harshagraj ,

Whether the value of field "Updated_Gate" in my previous post is correct? The more sample data and details are required, they need to show all the situations you mentioned. And how to know which door is the previous one of the current door?

Best Regards

Rena

Hi @Anonymous yes u were correct with the column you mentioned. That is what i need for. Actually its based on the Project numbers.Intially it starts from G1-G6. But our scope is grom G3 only. As we are not bothered about G1- G2 gates. The thing is due to data restictions i cant upload the full data. Please please let me know how i can help you further.

Anonymous
Not applicable

Hi @harshagraj ,

You can create one calculated column as below:

Calculated = if('Table'[Recommendation]="Approve",'Table'[Gate],CALCULATE(max('Table'[Gate]),FILTER('Table','Table'[Gate]<EARLIER('Table'[Gate]))))

Best Regards

Rena

Hi @Anonymous thanks a lot for the solution you provided.
It was working absolutely fine. Now i have a small problem. Please see the screenshot below The calculation you provided me is Calculated Gate Column.  It is showing 3 rows instead of one. Please help me. 2020 Project Gate has G5 and Calculated Gate should only have G5. 

 

CF.JPG

Hi @Anonymous thank you for the responce. Yes you are correct i need a seperate column. Thanks in advance.

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