Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
i work for a service organisation. we got a big list with orders numbers. they are logical build like: CS(support request) 23 (year) 01(month) 01(day) and than ticket nummer xxxx for example 0001.
so the compleet number is cs2301010001 i want to make a formule that see the logical sequence so i can sort on date and see all the ticket numbers and how many tickets i got each day.
thanks in advance,
Solved! Go to Solution.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSi42MjYwBEIDA0Ol2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Order Number" = _t]),
#"Added Custom" = Table.AddColumn(Source, "Date", each #date(Number.From("20" & Text.Range([Order Number],2,2)),Number.From(Text.Range([Order Number],4,2)),Number.From(Text.Range([Order Number],4,2))), type date),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Ticket", each Text.End([Order Number],4),type text)
in
#"Added Custom1"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSi42MjYwBEIDA0Ol2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Order Number" = _t]),
#"Added Custom" = Table.AddColumn(Source, "Date", each #date(Number.From("20" & Text.Range([Order Number],2,2)),Number.From(Text.Range([Order Number],4,2)),Number.From(Text.Range([Order Number],4,2))), type date),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Ticket", each Text.End([Order Number],4),type text)
in
#"Added Custom1"
How to use this code: Create a new Blank Query. Click on "Advanced Editor". Replace the code in the window with the code provided here. Click "Done".
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 103 | |
| 80 | |
| 58 | |
| 51 | |
| 46 |