- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Unpivoting the data
Hi Everyone,
I need your support. I am working on a small project and the raw data is attached.
This is an online customer interaction platform. The customer register as a friend and they will get a coupon on various occasions.
Such as answering the survey, and giving their personal behaviors.
The data is based on conversation and all coupons are scattered.
My desire is simply to have a header ID, Coupon1, Coupon2, and so on. Rows with their ID, and Give or Used for their respective coupon.
ID | Coupon 1 | Coupon 2 |
1 | Given | Given |
1 | Used |
I tried grouping and unpivoting but ID is repeatedly shown.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

1. Right click the table, then "edit query" to open the Query Editor
2. Highlet USERID and Conversation Count, then Transform->Unpivot Columns-> Unpivot other columns (see screenshot)
3. Rename "Attribute" as "Status"
4. Create a conditional column as seen here for "used"
5. You can add a "given" column the same way
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

1. Right click the table, then "edit query" to open the Query Editor
2. Highlet USERID and Conversation Count, then Transform->Unpivot Columns-> Unpivot other columns (see screenshot)
3. Rename "Attribute" as "Status"
4. Create a conditional column as seen here for "used"
5. You can add a "given" column the same way
Data analyst by day, hockey goalie by night.
Did I help? Then please hit that "kudos" or "accept as a solution" button!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
02-10-2024 10:33 PM | |||
07-26-2024 12:47 AM | |||
Anonymous
| 07-15-2022 06:16 AM | ||
05-13-2024 03:10 AM | |||
09-19-2023 05:42 AM |
User | Count |
---|---|
137 | |
107 | |
85 | |
59 | |
46 |