Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a problem that requires some help.
I've loaded data from Excel into Power Query and I'm counting the number of records between two dates which is no problem but when there's no records in the date range it returns blank and I get an error.
The rest of my queries won't refresh until one record is entered in the date range.
The error message is:
"Column in Table contains blank values and this is not allowed for columns on the one side of many-to-one relatioship for columns that are used as the primary key of a table."
Is there a way to overcome this issue?
Solved! Go to Solution.
Do as it says - provide unique values without gaps on the one side of the one-to-many relationship. That's how star/snowflake schemas are supposed to work. You can't have null/blank as keys.
Hi,
Is there a reason that you are trying to solve it in the Query Editor. Would you be OK with a DAX solution? if yes, then share some data to work with and show the expected result.
Thank you Ibendlin, I understand that I can't have blank values but where I have filtered values between two dates and there are no records to return, How do I ensure that I don't get an error?
= Table.SelectRows(#"Date Column", each [Merged] >= (#"StartDate") and [Merged] <= (#"EndDate"))
Change the relationship type or break the relationship.
(is this a direct query source with dynamic M parameters?)
Hello Ibendlin,
Yes this is a direct query source with dynamic M parameters.
I'm pretty new to Power BI and the terminology
Well, congratulations - you have reached the bleeding edge. You have managed to unearth a design flaw.
Do as it says - provide unique values without gaps on the one side of the one-to-many relationship. That's how star/snowflake schemas are supposed to work. You can't have null/blank as keys.
Thanks Ibendlin for your help
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
145 | |
79 | |
63 | |
52 | |
47 |
User | Count |
---|---|
216 | |
89 | |
76 | |
67 | |
60 |