I am trying to track the difference in license numbers per feature for a tenant. My data is structured like this:
╔══════╦══════════╦══════════╦══════════╗
║ Date ║ Customer ║ Feature1 ║ Feature2 ║
╠══════╬══════════╬══════════╬══════════╣
║ 5/16 ║ A ║ 500 ║ 400 ║
║ 5/23 ║ A ║ 1000 ║ 300 ║
╚══════╩══════════╩══════════╩══════════╝
I want to be able to see the differences and deltas for Feature1 and Feature2 (and Feature3, etc) for every week. In my example, Customer A's Feature1 has a difference of 500 between 5/16 and 5/23.
Initial thoughts were create a column to calculate previous week for each record and try from there. I understand creating a calculated column for the difference per feature this way would create a circular dependency:
FeatureDelta=CALCULATE(MAX(Table[Feature1]),filter(Table,Table[Date]=earlier(Table[Prv Week]) && Table[Customer]=EARLIER(Table[Customer]))) - CALCULATE(MAX(Table[Feature1]))
There are quite a few features I want to show deltas for. Is there a way I can do this in PowerBI?