Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I would like to create the Version column using a Measure or Calculated column. The newest version should always be number 1. It can happen that several versions are loaded during the day. With Max I would always get the latest version but I need an automatic numbering.
Thanks for suggestions
Solved! Go to Solution.
Hi @Till ,
Accoring to your screenshot, are you want to add independent index for each location?
If so, you could try using RANKX() function.
https://docs.microsoft.com/en-us/dax/rankx-function-dax
However, Sorting text data with RANKX() function may not be so accurate. So you will need to convert the text column to DATETIME type.
_datetime = DATE(MID('Table'[s_insert_ts],7,4),MID('Table'[s_insert_ts],4,2),MID('Table'[s_insert_ts],1,2))+TIMEVALUE(RIGHT('Table'[s_insert_ts],5))
Then create a rank column as below.
Column = RANKX(FILTER('Table','Table'[location]=EARLIER('Table'[location])),'Table'[_datetime],,DESC)
Best Regards,
Jay
HI
It works
@AllisonKennedy
Thank you also for your help
Have a nice week.
Till
Hi @Till ,
Accoring to your screenshot, are you want to add independent index for each location?
If so, you could try using RANKX() function.
https://docs.microsoft.com/en-us/dax/rankx-function-dax
However, Sorting text data with RANKX() function may not be so accurate. So you will need to convert the text column to DATETIME type.
_datetime = DATE(MID('Table'[s_insert_ts],7,4),MID('Table'[s_insert_ts],4,2),MID('Table'[s_insert_ts],1,2))+TIMEVALUE(RIGHT('Table'[s_insert_ts],5))
Then create a rank column as below.
Column = RANKX(FILTER('Table','Table'[location]=EARLIER('Table'[location])),'Table'[_datetime],,DESC)
Best Regards,
Jay
HI
It works
@AllisonKennedy
Thank you also for your help
Have a nice week.
Till
@Till Can you use Power Query? If so, sort the s_insert_ts column first Descending, then click Add Column > Index > From 1
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Allison,
thank you for your message.
Yes, that would work.
However, today I have the challenge that one more site is added. Then this does not work. Do you also have a solution for this?
Sorry, I don't understand your question - is the screenshot what actually happened or what you want to happen? Is the raw data coming from different files?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Allison,
It is one table where the Location column has been added. These locations can make uploads in the table, which means that they are attached to the back of the table.
KR and thank's for your help.
Till
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |