RICH937
Board Regular
- Joined
- Apr 15, 2023
- Messages
- 59
- Office Version
- 365
- Platform
- Windows
- Mobile
Hi Excel People!
I tried my first nested "if/then" in PQ today, but am only getting "D" as a response. Can someone help me understand why? I pulled a similar formula from excel off the grid: Power Query If statement: nested ifs & multiple conditions Here's mine:
= Table.AddColumn(#"Reordered Columns1", "Custom", each if [COLUMN NAME A ]="TRUE" then
if [#"COLUMN NAME B FROM MERGE"]="TRUE" then "A" else "C"
else
if [#"COLUMN NAME FROM MERGE)"]="TRUE" then "B"
else "D")
==>all results in my PQ editor are "D"
In excel this would be: if([@column name]=true, if([@column name b]=true, "A","C"), if([@column name b]=true, "b", "d")
Any help in what I did wrong would be greatly appreciated!
Thank you!
I tried my first nested "if/then" in PQ today, but am only getting "D" as a response. Can someone help me understand why? I pulled a similar formula from excel off the grid: Power Query If statement: nested ifs & multiple conditions Here's mine:
= Table.AddColumn(#"Reordered Columns1", "Custom", each if [COLUMN NAME A ]="TRUE" then
if [#"COLUMN NAME B FROM MERGE"]="TRUE" then "A" else "C"
else
if [#"COLUMN NAME FROM MERGE)"]="TRUE" then "B"
else "D")
==>all results in my PQ editor are "D"
In excel this would be: if([@column name]=true, if([@column name b]=true, "A","C"), if([@column name b]=true, "b", "d")
Any help in what I did wrong would be greatly appreciated!
Thank you!