ALTER TABLE SWITCH statement failed. Table '%1!s!' is not aligned with the index '%2!s!' on indexed view '%3!s!'. The table ...

ALTER TABLE SWITCH statement failed. Table '%1!s!' is not aligned with the index '%2!s!' on indexed view '%3!s!'. The table is partitioned on column '%4!s!', but the index on the indexed view is partitioned on column '%5!s!', which is selected from a different column '%6!s!' in table '%7!s!'. Change the indexed view definition so that the partitioning column is the same as the table's partitioning column.