Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dax Index column Filter after name

Hi guys,
I need an index column that starts first, as soon as an object name is in another column If there is nothing in the column, nothing should be returned:

ObjectNameIndex
  
  
Object11
Object12
Object13
Object14
Object15
  
Object21
Object22
Object23
  

 

Thanks in advance

 

greetings Lukas

2 REPLIES 2
CNENFRNL
Community Champion
Community Champion

Hi, @Anonymous , it's fairly easy to achieve what you want in Power Query; you might want to try this,

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45W8k/KSk0uMVSK1SGXbYSbHQsA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ObjectName = _t]),
    
    #"Sorted Rows" = Table.Sort(Source,{{"ObjectName", Order.Ascending}}),
    #"Grouped Rows" = Table.Group(#"Sorted Rows", {"ObjectName"}, {{"All", each Table.SelectColumns(Table.AddIndexColumn(_, "Index", 1, 1, Int64.Type), {"Index"})}}),
    #"Expanded All" = Table.ExpandTableColumn(#"Grouped Rows", "All", {"Index"}, {"Index"})
in
    #"Expanded All"

Screenshot 2020-11-19 160139.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Anonymous
Not applicable

Hello @CNENFRNL I created the ObjectName Column with Dax (I get the Name form another Tabel) so I cant do this with Power Query

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.