Forum Discussion
using if function to create custom column
Hello All,
I work with info input by sales people, so there is alot of room for human error. To account for that in my dashboards I am trying to create a custom columns that would compare specific information namely Customer ID and branch location that we get from the sales module data to what we have recorded on our customer's info via CRM. Comparing these two tables.
I am looking to get a specific response, yes if it does not match.
No if it does.
That way I can exclude it from our dashboards until my team goes in and fixes the data, and it will be reflected on the next scheduled refresh.
I am having a tough time with creating this custom IF column. Currently I have a an error stating
Token RightParen expected
It identifies this on line 8, for the comma "," after ") > 0"
When I delete that area, then it starts to want me to delete the logic values of my IF expression.
I am hoping someone could assist me and let me know what I am doing incorrectly.
Best,
Ethan
if(
SUMX (#"TM product enrollment master list",
Find(
(#"TM product enrollment master list"[Branch Description]),
(#"Navigator Account Extract"[Branch Description])
,0
)
) > 0,
"No",
"Yes"
)
8 Replies
- Greg_DecklerCommunity Champion
mcnemare I think you want:
if( Find( (#"TM product enrollment master list"[Branch Description]), (#"Navigator Account Extract"[Branch Description]),, ,0 ) > 0, "No", "Yes" )Note: The double comma is NOT a mistake!!
You might be interested in this: https://community.powerbi.com/t5/Quick-Measures-Gallery/Fuzzy/m-p/1352914#M608
- mcnemareFrequent Visitor
Thank you for your assistance,
When using this function to create a custom column, it did resolve the previous issue. But I am getting
a token literal expected error.
thoughts?
(#"Navigator Account Extract"[Branch Description]),,if( Find( (#"TM product enrollment master list"[Branch Description]), (#"Navigator Account Extract"[Branch Description]),, ,0 ) > 0, "No", "Yes" )- mcnemareFrequent Visitor
I was able to resolve this it was '#', using ' is better.
I am now getting an error stating that
Too many arguments were passed to the FIND function. The maximum argument count for the function is 4.
I'm only comparing the same 2 variables from two seperate tables.
Any thoughts ? @Greg_Deckler
if( Find( ('TM product enrollment master list'[Branch Description]), ('Navigator Account Extract'[Branch Description]),, ,0 ) > 0, "No", "Yes" )---
Below is a simplified example of the data I am working with.
I am wanting to make the calulated column on the sales module table.
- amitchandakSuper User
mcnemare , I doubt that # too
IN case you are trying in edit query mode. You need M code and this like dax.
Try like
if(
SUMX ("TM product enrollment master list",
Find(
("TM product enrollment master list"[Branch Description]),
("Navigator Account Extract"[Branch Description]),
,0
)
) > 0,
"No",
"Yes"
)