01-15-2016 04:03 PM
Well @Greg_Deckler i'm very curious, i tried and this it's happened. (I think):
- When the source is a CSV file and the field is empty the query show it as "empty string" for this reason the value "" is true and the preview appear it as blank. (like your test)
- But, when the source is other (XLS, XLSX, ACCDB, etc) and the field is empty, the query show it as "null value", aaaaannnnd the value "" is false. Reason for this value on the preview appear it as null (like my test)
I didn't change the regional settings, and i'm very very curious
03-23-2016 09:07 AM
Seems you found a way out. What worked for you? This has not worked:
if [Country]="" then "USA" else [Country]
Could this have to do with this task "
- Filter the rows that come from the header of the CSV files. (Hint: One way to do this is to filter out the Country column from records containing “Country”)." ?
04-14-2016 05:56 AM
In lab 1 I also have a problem with the if statement.
On a Windows 10 laptop the formula is working. Because of issues with regional settings (Dutch) I switched to new installed WIndows 2012 R2 server with regional settings USA.
10-04-2016 06:05 PM
Taking this opportunity, How Can I perform a kind of IF (AND(... Power Query formula that will evaluate something like this:
Excel language to understand what I need: IF(AND(A2=0;B2=0);0;1).
Logical 1 = A2=0;
Logical 2 = B2=0;
If both are true, then the result will be 0 otherwise result will be 1
Thanks a lot.
10-05-2016 05:34 AM
Thank you. That solved the problem. I would love it if the online function reference for M was better... that if/then statement is not showing up on my searches. argh. thanks again.
10-10-2017 04:08 PM
Not totally related to the original question, but this comment pointing out that the whole sentence is case-sensitive solved my problem. The error message even has a capital 'T' in "Then"!!