Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello
I want to do a calculation:
CALCULATE(COUNTROWS(Table1),Table1[Column2]=Table2[Column1])
However it says the expression can only contain one column. Is there any workaround for this?
For example Table1:
1, A
2, B
3, C
Table2:
A
B
C
I want to count the rows of Table1 using as criteria Table1[Column2]=Table2[Column1] instead of hardcoding the criteria as Table1[Column2]="A" etc
Thanks
Hi @Anonymous ,
Is this problem solved?
If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If not, please let me know.
Best Regards,
Icey
Hi, unfortunately it is not solved. I get multiple errors of different types.
@Anonymous , In case they join on the same column you do not need that
else try
CALCULATE(COUNTROWS(Table1),filter(Table1,Table1[Column2]=max(Table2[Column1])))
CALCULATE(COUNTROWS(Table1),filter(Table1,Table1[Column2]=related(Table2[Column1])))
Row context need to forced using values or summarize when you check data above the match level
CALCULATE(COUNTROWS(Table1),filter(Table1,Table1[Column2]=max(Table2[Column1])),values(Table1[Column2]))
@Anonymous
I changed your sample data because all the three letters can be found in both tables.
Then I will find how many letters in table 1 can be found in table 2
Measure 2 =
VAR TBL=ADDCOLUMNS(SUMMARIZE(Table1,Table1[index],Table1[letter]),"MATCH",LOOKUPVALUE('Table2'[LETTER],Table2[LETTER],'Table1'[letter]))
VAR tbl2=FILTER(TBL,[MATCH]<>"")
return COUNTROWS(tbl2)hope this is helpful.
Proud to be a Super User!
@Anonymous ,
Try the below DAX:
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.