It looks like you are measuring the change in percentage of the total for each corporate family from quarter to quarter. You will need to create 3 calculated measures. I donβt know what your model looks like, so I canβt give you the exact formula, but here is the idea.
CurrentQtr%ofTotal:= Divide(Sum('Sales'[Units]),Calculate(Sum('Sales'[Units]), All['Product'[Corporate Family]))) PrevQtr%ofTotal:= DIVIDE(CALCULATE(Sum('Sales'[Units]), DATEADD(DimDate[DateKey], -1, QUARTER)), CALCULATE(Sum('Sales'[Units]), DATEADD(DimDate[DateKey], -1, QUARTER), All('Product'[Corporate Family])))) Change%ofTotal:= DIVIDE(([CurrentQtr%ofTotal]-[PrevQtr%ofTotal]),[PrevQtr%ofTotal])
I used the divide function because it handles division by zero errors. You use the ALL function to remove the filter in the Corporate Family column from the filter context. Change% ofTotal - it's just finding the differences. I calculate the% change, but you can just subtract.
Here is a link to a good blog post on time. And here , when calculating the percentage of the total.
mmarie
source share