Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.

Maximum Value based on Condition

Hi,

I have one table name Mst_User and it has two columns.

Column1 =  Category ( This is a List column and have two list values "Contractor", "Company Employee"

Column2 = EmpCode (Number)

Condition:

1. When i select Contractor, it should pick the maximum value of EMP Code + 1001. This value should be appearing in EMP code.

2. When i select Company Employee, it should allow me to enter value.

I have applied IF condition, Max() and IFS but getting following error message: 

Valid_IF:

IFS(
[_THISROW].[Category]="Contractor",
(MAX(List(Select(Mst_User[EmpCode],[Category]="Contractor"))))+1001
)

"The expression is valid but its result type 'Number' is not one of the expected type: Yes/No"

Appreciate your help on my query.

Thanks,

Rohit Gaur  

Solved Solved
0 13 375
1 ACCEPTED SOLUTION

Dear Friends,

Thanks for your time to attempt to solve this issue. Below please find the working solution for this issue:

IFS([Category]="Contractor",
Max(List(0)+(SELECT(Mst_User[EmpCode],[Category]="Contractor")))+1

)

 

Thanks,

Rohit Gaur

View solution in original post

13 REPLIES 13
Top Labels in this Space