Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Experts ,
I have Year field , i want to create four quarters for each year . Being a new qliker I do not know , how to do it .
Please help .
INPUT
LOAD * INLINE [
YEAR
2015
2016
2017
2018
2019
];
OUTPUT
YEAR | QUARTER |
2015 | Q1 |
2015 | Q2 |
2015 | Q3 |
2015 | Q4 |
2016 | Q1 |
2016 | Q2 |
2016 | Q3 |
2016 | Q4 |
2017 | Q1 |
2017 | Q2 |
2017 | Q3 |
2017 | Q4 |
2018 | Q1 |
2018 | Q2 |
2018 | Q3 |
2018 | Q4 |
2019 | Q1 |
2019 | Q2 |
2019 | Q3 |
2019 | Q4 |
Hi, Use the cross join to do that. Like shown below.
Data:
LOAD * INLINE [
YEAR
2015
2016
2017
2018
2019
];
Join (Data)
Load * inline [
Qtr
Q1
Q2
Q3
Q4
];
Regards,
Kaushik Solanki
Hi, Use the cross join to do that. Like shown below.
Data:
LOAD * INLINE [
YEAR
2015
2016
2017
2018
2019
];
Join (Data)
Load * inline [
Qtr
Q1
Q2
Q3
Q4
];
Regards,
Kaushik Solanki
Hi,
You can but this would be the easiest option I can think of. If you want to try for loop you can do that too.
Multiple for loop will be required.
Regards,
Kaushik Solanki
Just wanted to toss out a Design Blog post that might work as well:
Regards,
Brett