Need equivalent of an index function

Is there a function or method within Quick Sight that serves a similar purpose to Tableau’s INDEX function for generating sequential numbers without relying on the RANK function?

Essentially, I’m just looking to add sequential row numbers to a table visual that doesn’t need to be sorted.

1 Like

Hi @phalguni24 - I do not think QS has any auto increment sequence number functionality available, can you explore dense function which essentially added a sequence number with some columns or you can keep all columns.

By saying that let’s hear other experts opinion on this. Tagging @duncan @DylanM @ErikG @shravya @David_Wong @sagmukhe

Regards - Sanjeeb

1 Like

Hi @phalguni24
What type of dataset/datasource do you use?
BR

Hi Erik,

I’m using snowflake.

can’t you extend the SQL?

2 Likes

Hi @phalguni24 - I agree with @ErikG , the better option to generate the sequence number at snowflake side or in the custom Sql and use the advantage of source db.

Regards - Sanjeeb

1 Like

Could you clarify what you mean by “extending the SQL”? Are you suggesting the direct execution of a custom SQL query against the database to potentially create an index?
A bit confused, could you please explain once?

Okay, understood. Let me try that once. It’s either that or I’ll have to resort to using RANK functions, isn’t it? No other alternative, correct?

Hi @phalguni24 - In snowflake you can create a sequence object and then can be used in SQL or if you need to create new sequence, rank or dense rank may be an option.

Please check this and update your findings so that it can help wider community.

Regards - Sanjeeb

2 Likes

Hello @phalguni24, if this is a field you want to complete through a calculated field, I do believe the rank function is the best option. On this Quick Sight Community topic, one of our experts provided an example function to complete the task.

I do believe that since you are utilizing Snowflake, the best case scenario would be creating the index value in your snowflake view directly or from your SQL statement when you ingest the data into your Quick Sight dataset like Erik suggested.

I am going to mark this as a solution for now, but if your issue is not resolved after trying some of these options please let us know!

1 Like