Forum Discussion
Apply a custom Query to a salesforce data object import
- 1 year ago
djerryanderson
I did not look into your code, just saw the IF and replied π
The DAX code you wrote could be converted in to a table New Table under Modeling tab
djerryanderson
Powre Query is case sensitive "IF" should be "if"
Well this clears it up a bit - power query v DAX query. SO I need to learn different syntax. The case sentive nature of the "if" apparently is not all I need to do - ISBLANK apparently is not correct either.
- Fowmy1 year agoSuper User
djerryanderson
I did not look into your code, just saw the IF and replied π
The DAX code you wrote could be converted in to a table New Table under Modeling tab - Anonymous1 year agoNot applicable
Hi djerryanderson ,
Here I create a sample and I think you can refer to it.
As far as I know, we could only add one column in one time by Table.AddColumn Function.
Here I suggest you to add columns you need by if... then... else and then use Table.SelectColumns Function.
let Source = ..., #"Query" = ..., #"Added Street" = Table.AddColumn(Query, "Street", each if [MailingCity] = null then [Home_Address_Street_s] else [MailingStreet]), #"Added City" = Table.AddColumn(#"Added Street", "City", each if [MailingCity] = null then [Home_Address_City_s] else [MailingCity]), #"SelectColumns" = Table.SelectColumns(#"Added City",{"FirstName","LastName","Chirstmas_Gift_C","Street","City"}) in #"SelectColumns"Result of my sample is as below.
The logic of "State" and "Zip" columns are the same as "Street" and βCityβ.
Best Regards,
Rico ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.