There are 9 digits to be considered. Because 0 shouldn't be of any concern.
Now lets see, how many total permutation is possible (including repeatation). This is, 9*9*9=729
How many permutation possible if all the numbers are same? It is 9
How many permutation are possible all the numbers are different? It is 9*8*7=504
So our answer here is 729-9-504= 216