The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi, not sure if this is possible.
I have a table that contains 2 columns (Level and Model).
I need the information inside the Model column, however it's positioning differs on the level.
Below is the example:
The information I need:
If LEVEL = 1, I want to split it after 2nd character to get "55"
If LEVLE =2 or 3, I want to split it after 4th character to get "45" and "10".
Is this possible?
Thank you.!
Solved! Go to Solution.
Hello,
Yes, this is possible. I would consider using transform to accomplish this. In transform, add a custom column with the following M language:
if [Level] = 1 then Text.Middle([Model],2,2) else Text.Middle([Model],4,2)
I used it to get this:
Hope this helps!
Proud to be a Super User! | |
Hi @RalphyDaddy ,
I wanted to follow up and see if you’ve had a chance to review the information provided here.
If any of the responses helped solve your issue, please consider marking it "Accept as Solution" and giving it a 'Kudos' to help others easily find it.
Let me know if you have any further questions!
besides the solution in pq, you can also use DAX to create a calculated column
Proud to be a Super User!
Hello,
Yes, this is possible. I would consider using transform to accomplish this. In transform, add a custom column with the following M language:
if [Level] = 1 then Text.Middle([Model],2,2) else Text.Middle([Model],4,2)
I used it to get this:
Hope this helps!
Proud to be a Super User! | |