Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredJoin us at FabCon Vienna from September 15-18, 2025, for the ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM. Get registered
When working with data, particularly in business intelligence or reporting tools like Power BI, one of the most common challenges is how to manage fields that contain multiple values. A common example is when a field contains a list of values separated by a delimiter, like a client list for a ticket or an order.
You’ve probably encountered situations where a single field contains values like “Apple, X, Uber” and wondered: “How can I analyze this properly without ending up with a cluttered report?” Two of the most common methods for dealing with such scenarios are splitting by delimiter and unpivoting the data. But how do these approaches compare, and when should you use each one?
Let’s dive in!
Imagine you’re working with a dataset where tickets can impact multiple clients. The field for “Clients Impacted” might contain values like:
The issue is that you need to filter, group, and report on this data. But when the clients are in the same field, filtering them becomes a nightmare. You might end up seeing entries like “Apple, X, Uber” in the filter list, which is not ideal. You want a clean list of clients like “Apple, Microsoft, X, Uber,” and then to be able to see all tickets that impact Apple, even if other clients are also impacted.
To solve this, there are two main approaches: splitting by delimiter and unpivoting. Let's explore both.
Splitting by delimiter sounds like a quick fix. After all, you simply break the field into multiple rows based on the delimiter, and voilà, you're done! If a ticket impacts three clients, you end up with three separate rows, one for each client.
This may seem like a solution, but it comes with a catch: you’re duplicating ticket data. Each row for the same ticket contains the same ticket information (e.g., Ticket ID, Issue Description) multiple times. So, while you technically get multiple rows for each client, you're also bloating your data with repetition.
Unpivoting the data is a more structured, normalized approach to handling this type of multi-value field. Instead of creating multiple rows for the same ticket with repeated information, unpivoting breaks out the multi-value field into its own row for each client, while keeping the ticket-level data intact.
The key difference is that ticket-level data is not duplicated—it’s simply associated with the relevant client(s).
Scenario | Splitting by Delimiter | Unpivoting |
---|---|---|
Small datasets | Quick and simple for basic exploration or one-off reports. | Can be used but might be overkill for small datasets. |
Multiple client impact | Works, but produces messy and redundant rows. | Clean, normalized, and efficient. |
Performance-sensitive reports | Not ideal due to data bloat and redundancy. | More efficient and scalable for large datasets. |
Need for clean filtering | Filter list is cluttered with concatenated client names. | Clear and distinct filter list, much easier to use. |
Aggregations or counting | Risk of double-counting due to duplicated ticket data. | No duplication, better for aggregations and counts. |
Long-term data modeling | Becomes cumbersome as the dataset grows. | Best for building long-term, scalable data models. |
Both splitting by delimiter and unpivoting are valid techniques, but they serve different purposes depending on the situation:
If you’re dealing with small datasets, want a quick fix, and don’t mind some redundancy, splitting by delimiter might get the job done. Just be cautious when your data grows or when you need to perform more complex analyses.
If you’re working with larger datasets, need cleaner filters, want better performance, and require a more scalable solution, unpivoting is the better approach. It normalizes the data, reduces redundancy, and ultimately makes your reports more reliable and easier to manage in the long run.
At the end of the day, unpivoting is usually the more powerful, flexible solution, especially as your reporting needs grow and become more complex. However, if you’re in a pinch and only need a quick, simple breakdown, splitting by delimiter can do the trick. Just remember, if you choose the quick route, don’t be surprised when things start to get messy as your data expands!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.