Forum Discussion
Ugot2Bsh1tingMe
2 years agoRegular Visitor
How to create a column based off the values in other columns
Hello, I have a table that contains, among other things, order numbers, and order stop sequences. What I would like to achieve is to create a column that distinguishes based on stop sequence if t...
- Anonymous2 years ago
Hi Ugot2Bsh1tingMe ,
Thanks to mahenkj2 for the reply, please allow me to provide another insight:
You can create a calculated column and then use the switch function to get the desired result.Column = VAR _max = CALCULATE(MAX('Table'[Order Stop Sequence]),FILTER(ALL('Table'),'Table'[Order Number] = EARLIER('Table'[Order Number]))) RETURN SWITCH(TRUE(), 'Table'[Order Stop Sequence] = 1,"Origin", 'Table'[Order Stop Sequence] = _max,"Destination", "Stop Off")If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ugot2Bsh1tingMe
2 years agoRegular Visitor
Thank you all for your help! Both solutions listed did work. Mahenkj2, thank you for pointing out some information that would have clarified my request. I'll (try to, lol) be sure and be more clear in future requests. Again, thanks to all.