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 September 15. Request your voucher.
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.
User | Count |
---|---|
60 | |
55 | |
53 | |
49 | |
30 |
User | Count |
---|---|
179 | |
87 | |
70 | |
48 | |
45 |