Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi guys
Is that possible to add an index column to a summarised table which is not directly derived from a query, or alternatively, can I simply create an individual column counting the row number for each row?
Cheers
Add an index column with the formula
ID = RANKX('TableName',[RankColumn],[RankColumn],1)
If no such RankColumn exists then create one...
RND = RAND()
ID = RANKX('TableName',[RND],[RND],1)
Hi @wxqqaz,
Can you add an index in the table "YTDDATA"? If you can , there may be a workaround.
About adding an index in the summarized table:
Daily report table =
SUMMARIZE ( ytddata, ... ...
"OldIndex", MAX ( ytddata[index] ) )Adding a new index:
Index =
CALCULATE (
COUNTROWS ( 'Daily report table' ),
FILTER (
'Daily report table',
'Daily report table'[OldIndex] <= EARLIER ( 'Daily report table'[OldIndex] )
)
)The output in my test:
Best Regards!
Dale
Hi @wxqqaz,
Could you please tell me if your problem was resolved? Please mark the proper answer if it worked. That will be a help to the others.
Best Regards!
Dale
Hi @wxqqaz,
If the "Date format" in the table is unique, you could try this formula. It works in my scenario.
index =
CALCULATE (
COUNTROWS ( 'Daily report table' ),
FILTER (
'Daily report table',
'Daily report table'[Date fromat]
<= EARLIER ( 'Daily report table'[Date format] )
)
)
Best Regards!
Dale
Thanks for your speedy reply, unfortunately the date column in my case is not of unique values and therefore cannot be used as the criteria.