First, your naming is very confusing because what you created is a Measure that creates some vvalue. It is not a Rank. If you want to Rank that value I think you need to make that value a column and not a Measure. I may be incorrect in that.
To get the measure as requested, you may try measure as below:
Rank = RANKX(ALLSELLECTED(Table[ItemID]),[Measure])
I tried to create calc colum, not measure = RANKX(ALLSELECTED('Item'[ItemId]);[Rating]) but all rows is blank in this column.
Rating is my calculation = CALCULATE(SUMX(SalesInvoice;SalesInvoice[InvoiceQty]*0,7)*[Diff CP - PD]*1,7)