We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I'm trying to run the following formula in a custom column and its generating a token comma error. Can anyone review and let me know what's missing?
Thanks!
IF([Primary Home Address Line 1]<>[OG Census_Sheet.Primary Home Address Line 1] or [Primary Home Address Line 2] <> [OG Census_Sheet.Primary Home Address Line 2] or [Primary Home Address Line 3] <> [OG Census_Sheet.Primary Home Address Line 3] or [#"Primary Home Address - City"] <> [#"OG Census_Sheet.Primary Home Address - City"] or [#"Primary Home Address - State"] <> [#"OG Census_Sheet.Primary Home Address - State"] or [#"Primary Home Address - Postal Code"] <> [#"OG Census_Sheet.Primary Home Address - Postal Code"] then "flag" else " "
https://community.powerbi.com/t5/Desktop/Custom-Column-Query-If-ands-or/td-p/1637388
Use then and else like this
Can you show the actual screenshot of the code you are using?
This the correct syntax
IF([Primary Home Address Line 1]<>[OG Census_Sheet.Primary Home Address Line 1] or [Primary Home Address Line 2] <> [OG Census_Sheet.Primary Home Address Line 2] or [Primary Home Address Line 3] <> [OG Census_Sheet.Primary Home Address Line 3] or [#"Primary Home Address - City"] <> [#"OG Census_Sheet.Primary Home Address - City"] or [#"Primary Home Address - State"] <> [#"OG Census_Sheet.Primary Home Address - State"] or [#"Primary Home Address - Postal Code"] <> [#"OG Census_Sheet.Primary Home Address - Postal Code"] , "true" , else)
Thank you for the quick response. When I use your solution it shows an error 'Token Literal expected' with the closing parenthesis after 'else' marked.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 36 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 38 | |
| 34 | |
| 23 |