Forum Discussion
rhcentennialh
Helper II
6 years agoCalculated Column - Two Tables with a Filter or IF stament
What I would like to do is identify the "Names" that are on "Table 2" that are also on "Table 1" that have "Visit Type A". Please let me know if you need further clarifcation ID Name Vis...
- 6 years agoAh oke what threw us off was the incorrect value at the bottom of Table2 then, as Name C has no Visit A in table 1.
This might be what you are looking for:
CalcColumn =
VAR curName = Table2[Name]
RETURN
IF( COUNTROWS( FILTER( Table1, Table1[Name] = curName && Table1[Visit Type] = "visit A") ) = 0, FALSE, TRUE)
Typing on my phone, so be aware of typos 🙂
If this answers your question, please accept it as the solution:)
rhcentennialh
Helper II
6 years agoThank you for the quick resposne. However i dont belive either of these are the solution i was looking for.
What i am trying to do with the calculated column is the following
1.) Check to see if an ID that is on Table 2 is on Table 1
2.) If there is a match, then check to see if that ID/Name had a specific Visit Type (Example: Visit Type A) on Table 1
3.) If they did then proceed to populate the calucalted colmun with "True" / "False" or "Visti Type"
Let me know if you have any questions or further explination
- JarroVGIT6 years ago
Resident Rockstar
Ah oke what threw us off was the incorrect value at the bottom of Table2 then, as Name C has no Visit A in table 1.
This might be what you are looking for:
CalcColumn =
VAR curName = Table2[Name]
RETURN
IF( COUNTROWS( FILTER( Table1, Table1[Name] = curName && Table1[Visit Type] = "visit A") ) = 0, FALSE, TRUE)
Typing on my phone, so be aware of typos 🙂
If this answers your question, please accept it as the solution:)