I am using a Thread Group with Number Of Threads = 5 with an HTTP request.
In the request I want to include a parameter with the value of the thread number, e.g.,
${__threadNum} does not work well alone.
${__threadNum}
You will need use ${__eval(${__threadNum})}. Try to use this:
int threadNum=ctx.getThreadGroup().getNumThreads();
ctx is from JmeterContext