Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I have a database column which contains workorder numbers (format text - contains alpha numeric characters). I want to create categories based on the first character of the workorder which can be the number 1 to 9. The workorder numbers which start with 2 and 5 are one group, the numbers which start with 3,5, and 7 are the second group. The numbers with 8 and 9 are 2 separate groups. The remaining numbers (1 and 😎 are leftovers and are valid when the not belonging to the first groups.
Tried with if-or calculation but I get the message that I only can use 2 nested or's. Tried also SWTICH function but not succesfully.
Can somebody help?
Thanks in advance.
Solved! Go to Solution.
@Hyperchef1969,
Create the following column in your table.
GROUP = IF(LEFT(Table[workoder],1) IN {"2","5"},"G1",IF(LEFT(Table[workoder],1) IN {"3","4","7"},"G2",IF(LEFT(Table[workoder],1)="6","G3",IF(LEFT(Table[workoder],1)="9","G4","G5"))))
If the above DAX doesn't work, please share sample data of your table here.
Regards,
Lydia
@Hyperchef1969,
Create the following column in your table.
GROUP = IF(LEFT(Table[workoder],1) IN {"2","5"},"G1",IF(LEFT(Table[workoder],1) IN {"3","4","7"},"G2",IF(LEFT(Table[workoder],1)="6","G3",IF(LEFT(Table[workoder],1)="9","G4","G5"))))
If the above DAX doesn't work, please share sample data of your table here.
Regards,
Lydia
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
109 | |
101 | |
39 | |
31 |