Forum Discussion
tgjones43
Helper IV
7 years agoCustom column based on several other columns
This is a tricky one to describe, so here goes. I have attached a much simplified example. The data relates to fish sampling data in rivers. I have a table with thousands of 8-digit numbers in th...
tgjones43
Helper IV
7 years agoThank you for the response. I have pasted the data below, with the column at the end showing the expected outcome.
| ID | ID 2 | Name | Value | Custom Column |
| 21770161 | null | Altitude | 284 | null |
| 21770161 | null | Width | 5 | null |
| 21770161 | 21779013 | Program | Core Fisheries Monitoring Program | Survey 1 |
| 21770161 | 21779155 | Program | Core Fisheries Monitoring Program | Survey 2 |
| 21770161 | 21779296 | Program | Water Framework Directive Programme | Survey 3 |
| 21770161 | 21779013 | Purpose | Temporal | Survey 1 |
| 21770161 | 21779155 | Purpose | Temporal | Survey 2 |
| 21770161 | 21779296 | Purpose | Salmonid | Survey 3 |
| 21770161 | 21779013 | Repeat frequency | 1 year | Survey 1 |
| 21770161 | 21779155 | Repeat frequency | 1 year | Survey 2 |
| 21770161 | 21779296 | Repeat frequency | 6 years | Survey 3 |
| 21770161 | 21779013 | Survey Strategy | Quanitative | Survey 1 |
| 21770161 | 21779155 | Survey Strategy | Semi-quantitative | Survey 2 |
| 21770161 | 21779296 | Survey Strategy | Semi-quantitative | Survey 3 |
| 21770161 | 21779013 | Guideline Method | PDC Electric Fishing | Survey 1 |
| 21770161 | 21779155 | Guideline Method | PDC Electric Fishing | Survey 2 |
| 21770161 | 21779296 | Guideline Method | Electric Fishing | Survey 3 |
Greg_Deckler
Community Champion
7 years agoSo, could you just create a second query where you pull out all of the distinct values from ID2 and assign an Index to them. That way you should be able to easily relate that dimension table back to this fact table and have what you want, correct?