Forum Discussion
Arioli_Chezhian
Helper II
3 years agoDynamic "IF" condition for calculated column
Hello everyone,
I have a requirement to create a calculated column or Measure to achieve the below mentioned requirement.
If Role 1 has the training T1 it should not be repeated for other Roles. For other roles in the place of T1 it should be 'null' value.
Likewise for Role 2 it should be T2 and role 3 and so on. If it is only 3 roles in that case we can write using "if" or "switch" function but if it contains 100 or 1000 roles in that case how should we achieve this requirement.
Please advice.
pls try this
Required Output = VAR _rx = RANKX('Table',[Name],,ASC,Dense) VAR _Result = RANKX('Table',[Trainings],,ASC,Dense) RETURN IF(_Result=_rx,[Trainings])
3 Replies
- Ahmedx
Super User
pls try this
Required Output = VAR _rx = RANKX('Table',[Name],,ASC,Dense) VAR _Result = RANKX('Table',[Trainings],,ASC,Dense) RETURN IF(_Result=_rx,[Trainings])- Arioli_Chezhian
Helper II
Ahmedx - Thank you for sharing this result.
- Ahmedx
Super User
If this post helps, then please consider accepting it as the solution to help other members find it faster.