Forum Discussion
UKNSI-Powerbi
3 years agoFrequent Visitor
Row level variance
At the moment I have a table of customer cumulations grouped by Cust/Seq/Contract/Part/Date/Release/YYYYMM Cust Seq Contract Part Date Release Rev YYYYMM CUMULATION CUST1 1 0...
- 3 years ago
you may try to add a calculated column like this:
Variance2 = VAR _date = [Date] VAR _cumpre = CALCULATE( SUM(TableName[CUMULATION]), ALLEXCEPT(TableName, TableName[Cust], TableName[Seq], TableName[Contract], TableName[Part], TableName[YYYYMM]), TableName[Date] = _date-1 ) RETURN DIVIDE( [CUMULATION] - _cumpre, _cumpre)tried and it worked like this:
FreemanZ
3 years agoSuper User
you may try to add a calculated column like this:
Variance2 =
VAR _date = [Date]
VAR _cumpre =
CALCULATE(
SUM(TableName[CUMULATION]),
ALLEXCEPT(TableName, TableName[Cust], TableName[Seq], TableName[Contract], TableName[Part], TableName[YYYYMM]),
TableName[Date] = _date-1
)
RETURN
DIVIDE( [CUMULATION] - _cumpre, _cumpre)
tried and it worked like this: