The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am getting an issue when I try to filter a certain column. This column is added and the code is as follow
if Date.Month([date]) < Date.Month(Date.From(DateTime.LocalNow())) then 1 else Date.Day([date])
In the first image is before I tried to filter. I would like to point out that when I load all values it goes empy (see second image). The error message I get is
Expression.Error: We cannot convert null to type logical.
Detail:
Value=
Type=[Type]
Solved! Go to Solution.
It's hard to say. Most likely there is a step earlier in the query that triggers an error in a row that is not loaded in the preview. PQ loads 1,000 rows and uses those to help you write the query. But if something strange happens after row 1,000 can happen. Look for "changed Type" steps on your date column. Go to the step prior and then click the drop down list like you showed. This should load the full list so you can identify the issue. Also you could force column profiling to load the entire data set. This option is on the bottom left. Change if from 1,000 to all data. This my also help.
It's hard to say. Most likely there is a step earlier in the query that triggers an error in a row that is not loaded in the preview. PQ loads 1,000 rows and uses those to help you write the query. But if something strange happens after row 1,000 can happen. Look for "changed Type" steps on your date column. Go to the step prior and then click the drop down list like you showed. This should load the full list so you can identify the issue. Also you could force column profiling to load the entire data set. This option is on the bottom left. Change if from 1,000 to all data. This my also help.