kbarber1's avatar
kbarber1
New Member
3 years ago
Status:
New

Optimize COLUMNSTATISTICS

COLUMNSTATISTICS is a useful but slow function. To make it calculate faster, consider calculating only the portion of it that is used in the DAX expression from which it is called. For example, if I use SELECTCOLUMNS(COLUMNSTATISTICS(),[Table Name]), then only the Table Name column should be calculated. If I use FILTER(COLUMNSTATISTICS(),[Table Name]="Table1"), then the statistics columns of COLUMNSTATISTICS should be calculated only for the columns of Table1. This is in contrast to calculating all of COLUMNSTATISTICS and then filtering the result to show only the rows for Table1.

Recent ideas