Pivot Data in ETL

I have dataset i am trying to reformat using a pivot table. I cant use the pivot chart because it only shows measures as values so i am trying to reorganize my data using pivot in etl. My data includes Facility, Date, and Task Completed (yes/no). Beow on left is how my data currently is and on right is how I want to set it up. Could someone assist? I am trying the pivot and unpivot tiles but having some trouble.
Current | To Be | |||||
---|---|---|---|---|---|---|
Facility | Date | Task Cmpleted | Facility | 1/1/2024 | 1/2/2024 | |
Facility 1 | 1/1/2024 | Yes | Facility 1 | Yes | Yes | |
Facility 2 | 1/1/2024 | Yes | Facility 2 | Yes | Yes | |
Facility 3 | 1/1/2024 | Yes | Facility 3 | Yes | Yes | |
Facility 4 | 1/1/2024 | Yes | Facility 4 | Yes | Yes | |
Facility 5 | 1/1/2024 | No | Facility 5 | No | Yes | |
Facility 1 | 1/2/2024 | Yes | ||||
Facility 2 | 1/2/2024 | Yes | ||||
Facility 3 | 1/2/2024 | Yes | ||||
Facility 4 | 1/2/2024 | Yes | ||||
Facility 5 | 1/2/2024 | Yes |
Best Answer
-
@TMonty0319 I'm not aware of a systematic way to do this. However, I also don't recommend using Magic ETL to pivot date fields for a few reasons:
- This eliminates the date field, which means you can no longer use date-based filtering (This Week, YTD, etc.)
- Every new date would add another column, which you would then have to add to your card
Have you considered changing your "Task Cmpleted" column to have binary 1 and 0 values in the dataset's current structure so that you have a numeric value for a pivot table card?
1
Answers
-
@TMonty0319 I'm not aware of a systematic way to do this. However, I also don't recommend using Magic ETL to pivot date fields for a few reasons:
- This eliminates the date field, which means you can no longer use date-based filtering (This Week, YTD, etc.)
- Every new date would add another column, which you would then have to add to your card
Have you considered changing your "Task Cmpleted" column to have binary 1 and 0 values in the dataset's current structure so that you have a numeric value for a pivot table card?
1
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 655 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive