Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, please I am using table variable and when i call the table name "evaluate tbl "with evaluate it works but when I use it in the context of countrows it returns the error above
*
DEFINE
VAR fsumX =
SUMMARIZE(CHA,[Employee],[YearNo],[Organisation],[MonthNamed],
"CallTimeDuration",SUM(CHA[CallTimeDuration])
)
VAR tbl =
FILTER(
fsumX,
[AvgDBanding] = "Less Than 60 Min(s)" && CHA,[Organisation] = "b" && CHA,[MonthNamed] ="November"
)
EVALUATE
COUNTROWS(tbl)
//tbl
*
I saw a similar solution that works with countrows (https://social.msdn.microsoft.com/Forums/sqlserver/en-US/42325576-064d-4fbf-bc1c-12fbd6c89728/dax-co...) but i could not get the quey for mine.
I will appreciate a guide on this
Thanks
Solved! Go to Solution.
Sorry, I thought your problem was in PBI.
In Dax Studio you need to use the following to check the result of a measure:
return
ROW("Result:", COUNTROWS(tbl))
Hi,
When I try to run the code I get an error on [AvgDBanding] does not exist.
When you add [AvgDBanding] to the FsumX / Summarize function then it will probably work.
It does work for me either as a calculated table or as a measure (with countrows, of course), but I tested it with a very simple test set.
Regards,
Thanks for the response, the return works well for me as well, but the "countrows" function on the tbl does not work, I was using the code in dax studio and it was throwing the error, but when I executed the code (countrows)in on power bi it worked, so I am guessing am missing something
Sorry, I thought your problem was in PBI.
In Dax Studio you need to use the following to check the result of a measure:
return
ROW("Result:", COUNTROWS(tbl))
Thanks - this solution definitely worked!
@Anonymous Thanks for the solution, I had a look at the help of dax studio for "row" context but could not find it , can you send me on a link where i can see more on it.
@Anonymous
There is not too much explanation in the documentation, but it is a starting point: https://docs.microsoft.com/en-us/dax/row-function-dax
Hope this helps.
@Anonymous Thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 30 | |
| 19 | |
| 12 | |
| 11 |