The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all,
I have a column where some entries contain the values ML1, ML2, ML3, ML4 or ML5 at the start of the text. I am looking to add a column in my table that returns "ML#" depending on what ML code it contains and return nothing if there is no ML code. The ideal solutiuon would be the following.
Description | Value | ML Category |
ML3: Big red house | 10 | ML3 |
ML3: Small dog | 25 | ML3 |
Orange headphones | 50 | |
ML1: curved ramp | 1 | ML1 |
Blue pen pot | 75 |
It would then be great if I could have a visual showing all the entries with ML codes sorted by a hierarchy of ML1 > ML2 > ML3 >ML4 >ML5 and where there are 2 values for one code sort by 'values' high to low. e.g.
Description | Value | ML Category |
ML1: curved ramp | 1 | ML1 |
ML3: Small dog | 25 | ML3 |
ML3: Big red house | 10 | ML3 |
Been trying to find a solution to this for a while so any assistance would be appreciated!
Solved! Go to Solution.
Is the ML always going to be at the start?
If so, create a column in Power Query using an if statement with Text.StartsWith() to look for "ML" and then retrieve the first 3 chars using Text.Start() (if it doesn't start with ML, make it "")
--
In the table visual, filter out the empty 'ML Category' values from the filter pane. And sorting by 2 columns can be done using the shift key clicking on the column header.
Thats worked perfect - Thanks!
Is the ML always going to be at the start?
If so, create a column in Power Query using an if statement with Text.StartsWith() to look for "ML" and then retrieve the first 3 chars using Text.Start() (if it doesn't start with ML, make it "")
--
In the table visual, filter out the empty 'ML Category' values from the filter pane. And sorting by 2 columns can be done using the shift key clicking on the column header.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
78 | |
68 | |
52 | |
50 |
User | Count |
---|---|
121 | |
119 | |
77 | |
62 | |
61 |