Are Rank functions case-insensitive?
I'm trying to get a rank for data ordered by modified date and partitioned by id. id is alphanumeric and case-sensitive in the source system. However, when I apply the rank (or row_number) function I get 2 different ids grouped because of the letter case. Collation mode is set to Binary in the ETL Settings.
Best Answer
-
@AndreiA I would try using the str_to_hex function on your id field in the formula tile and then build the rank off of that. This will allow the rank to see those two values as different values rather than the same.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.3
Answers
-
Hi @AndreiA ,
So I would make a formula that is just UPPER(id) and do the rank off that. That way you keep your case sensitive one, but also can do your rank on this new capitalized column.
Let me know if that works.
John Le
You're only one dashboard away.
More video solutions at: https://www.dashboarddudes.com/pantry
John Le
Are you on my newsletter? If not, signup here so you don't miss out on my Domo tricks, alerts about my webinars, cooking tips and more
Signup here:
1 -
Hi,
It won't work in my case, the rank function does it for me already as it is case-insensitive.
For example, id1='123iio' and id2='123iiO'. I need to treat them as two individual accounts.
0 -
@AndreiA Is there a pattern of when a character would be uppercase vs lowercase in your id field? If so, you could create a secondary concatenated id to use for ranking. For example, if the last character is uppercase for Product A and lowercase for Product B you could use a formula like this to create your new partition id:
case when `Product` = 'A' then concat(`id`,'A') when `Product` = 'B' then concat(`id`,'B') end
1 -
@AndreiA I would try using the str_to_hex function on your id field in the formula tile and then build the rank off of that. This will allow the rank to see those two values as different values rather than the same.
**Check out my Domo Tips & Tricks Videos
**Make sure to any users posts that helped you.
**Please mark as accepted the ones who solved your issue.3 -
@MarkSnodgrass That's a great idea and it works, thanks a lot!
0 -
This just saved my butt.
1
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 637 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 761 Beast Mode
- 65 App Studio
- 42 Variables
- 703 Automate
- 182 Apps
- 458 APIs & Domo Developer
- 53 Workflows
- 10 DomoAI
- 39 Predict
- 16 Jupyter Workspaces
- 23 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 132 Manage
- 129 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive