Beast mode for count distinct by concatenating two columns
Hi All,
I am trying to do the following beast mode operation:
COUNT(DISTINCT (CASE when `ord_date` < CURDATE()-1 then CONCAT(`sales_no`,`part_no`) end ))
The expectation is the distinct combination of sales_no and part_no ..But I am not getting that..Can you please help me here..
Thanks,
Arun
Comments
-
Hi All, Can you please help me here..The expectation is the distinct count of the combination of sales no and part_no ..But I am not getting the distinct count...can you please help me here..
0 -
I only just started using Domo not too long ago, but I have worked with dates before. Have you tried using ADDATE(
ord_date
, interval -1 day) instead of CURDATE() - 1. If my understanding is correct, if you use a negative number this function will subtract that number from the date field given.It would look like this:
COUNT(DISTINCT (CASE when `ord_date` < ADDATE(CURDATE(), interval -1 day) then CONCAT(`sales_no`,`part_no`) end ))
0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 691 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 112 Manage
- 109 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive