Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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.
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
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
83 | |
69 | |
68 | |
39 | |
37 |