Forum Discussion
Absolute at total
- Anonymous9 years ago
Omega,
Create the following measures and check if you get expected result.
NewMeasure = IF(COUNTROWS(VALUES(Table2[SKU]))=1,Table2[ABSDIFF],SUMX(VALUES(Table2[SKU]),[ABSDIFF]))
Measure 3 = [NewMeasure]/[ExportTotal]
Regards,
Lydia
Omega,
I can get your expected result by creating the following measures. How do you create visual in your scenario?
ABSDIFF = ABS(SUMX(Table2, (Table2[Export]-Table2[Import])))
ExportTotal = SUM(Table2[Export])
Measure 2 = DIVIDE(Table2[ABSDIFF],Table2[ExportTotal])
Regards,
Lydia Zhang
It's close but when you combine SKUs it won't give the correct value because PBI will calculate the difference at week level then sum up the difference at SKU level. My aim is to calculate the total exports and imports per SKU -> Apply ABSDIFF -> Sum ABSDIFF and the divide by total exports.