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
Thanks!!! My bad didn't realize I'm doing it wrong. Now, I want to take the total absolute value (470) and divide it by the total export per SKU (8510). I tried the following measure:
Measure 2 = SUMX(Table2,[Measure])/SUMX(Table2,Table2[Export]) but I'm not getting correct % :(
I even tried: Measure 2 = SUMX(Table2,[Measure])/SUM(Table2[Export]) but still wrong because it gets me the total export for all the SKUs :(
Please advise.
Thanks!
Measure 2 = divide(SUMX(Table2,[Measure]),SUMX(Table2,Table2[Export]))
- Omega9 years agoImpactful Individual
Same values as I had :(
- vanessafvg9 years agoCommunity Champion
divide(SUMX(Table2,[Measure]),calculate(SUMX(Table2,Table2[Export]),sku = 8510))
- Omega9 years agoImpactful Individual
What if I have multiple SKUs?
- Anonymous9 years agoNot applicable
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- Omega9 years agoImpactful Individual
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.