Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a dataset with one of the columns that I would like to split into separate columns.
Column1 |
Age_18-29_yrs |
Gender_male |
Gender_female |
into this:
Column1 | Column2 |
Age_18-29_yrs | |
Gender_male | |
Gender_female |
Assuming there are more rows than the ones provided above. Is there a clean way of doing this without causing the database to bloat?
Thank you for your help
Hello,
If you've some values, you can simply use a IF statement to create two distincts fields:
MyTab:
LOAD
IF (Column='Age_18-29_yrs', Column, NULL()) AS Column1,
IF (Column='Age_18-29_yrs', NULL(), Column) AS Column2,
*
INLINE [
Column
Age_18-29_yrs
Gender_male
Gender_female
];
If you've multiples values, you can use match with mapping tables.
PS : Alternatively, you can also use these expressions to create calculated dimensions (masters items)
Thank you - I created calculated dimension.
Hello,
If you've some values, you can simply use a IF statement to create two distincts fields:
MyTab:
LOAD
IF (Column='Age_18-29_yrs', Column, NULL()) AS Column1,
IF (Column='Age_18-29_yrs', NULL(), Column) AS Column2,
*
INLINE [
Column
Age_18-29_yrs
Gender_male
Gender_female
];
If you've multiples values, you can use match with mapping tables.
PS : Alternatively, you can also use these expressions to create calculated dimensions (masters items)
Thank you - I created calculated dimension.