Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hey Everyone,
I have a dim table that I'm creating from unique values of an existing column in my data model.
I'm taking a field of brands from customers and creating a dim with the following format:
brand = column of brand names
customer = column of the customer name
customer_brand_key = a concatenation of customer and brand. The reason for this is because you can have the same brand across multiple customers, so this is an explicit key to make the join
example rows:
customer, brand, customer_brand_key
cust1, bubbles, cust1_bubbles
cust1, BuBBleS, cust1_BuBBleS
In the Power M Query, doing a 'remove duplicates' step these two are treated as 'different' and so they are both kept. This is expected behaviour for me. But, when I load the table into the data model, these two rows are treated as duplicates, so I get the error related to 'duplicates in a 1:many key'.
Why are they treated differently in these instances and what's the best approach to solving this issue? I can't lowercase everything because I must retain the case due to this being an embedded report that gets variables passed in the API for filtering on brand.
This is a common issue. M (query editor) is case sensitive, while DAX is not. You will need to make the case match (upper, lower, capitalize) before your remove duplicates.
Pat
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!