Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a straight table and I need to capture the number of columns (both Dimensions and Measure) in the table.
The table has columns that show/hide conditionally so I need the count of all the columns that are not conditionally hidden.
I have not come up with any way to do this. I looked at NoOfColums function, but that is for pivot tables.
Any help on this would be greatly appreciated.
Thank you,
Brian
Why not using the show/hidden conditions to evaluate how many dimensions/expression have been set to TRUE?
- Marcus
You could use Dimensionality(), except specifically in the total where that wouldn't work.
Hi Or,
Thank you. That will give me the number of dimensions in the table. I need both dimension and expressions.
My test table has 13 total columns 2 dimensions and 11 measures. Dimensionality() correctly returns 2.
I need to count all the columns in the table.
Regards,
Brian
Count all non-blank cells in column 1 of the table on the active sheet. 'Save this number of cells as variable "TransQty". 'If count is 0, message "No projects on this tab are marked for transition". 'If count is greater than 0, yes/no message "'TransQty' projects will be transitioned from this tab. Would you like to proceed?" 'If "no", end. 'If "yes", proceed with the rest of the code.
Counts nonblank results when evaluating the result of an expression over a table. That is, it works just like the COUNTA function, but is used to iterate through the rows in a table and count rows where the specified expressions results in a non-blank result.
Why not using the show/hidden conditions to evaluate how many dimensions/expression have been set to TRUE?
- Marcus
Hi Marcus,
Yes. I am not sure why I didn't think of that. That worked for me. Thank you!!
Best Regards,
Brian