Forum Discussion
Remove Negative Values with Calculate
- 8 years ago
Hi,
Try this revised measure
=if(HASONEVALUE(ditens[Tamanho]),IF([Calc Sugestão de Compras]>=0,[Calc Sugestão de Compras],0),SUMX(SUMMARIZE(VALUES(ditens[Tamanho]),[Tamanho],"ABCD",IF([Calc Sugestão de Compras]>=0,[Calc Sugestão de Compras],0)),[ABCD]))
Hope this helps.
Hello Ashish_Mathur, thank you for helping me with this question.
I decrease the file size to 5Mb, the Stock Balance values will not be the actual values, but what matters is how much I need to calculate correctly.
Hi,
Try this revised measure
=if(HASONEVALUE(ditens[Tamanho]),IF([Calc Sugestão de Compras]>=0,[Calc Sugestão de Compras],0),SUMX(SUMMARIZE(VALUES(ditens[Tamanho]),[Tamanho],"ABCD",IF([Calc Sugestão de Compras]>=0,[Calc Sugestão de Compras],0)),[ABCD]))
Hope this helps.
- leudyston8 years agoHelper I
Hi Ashish_Mathur,
In the context of the First Table is correct, but when I filter more than one store, the second table that shows the values per store are not correct, I tried to change the measure but it is well advanced and unfortunately I could not.
Note: In the pbix file I had to move almost all the stores, I left only the movement of the Manhattan and Aldeota stores, I think it is important to inform this so that you can understand, since when filtering any other stores, the values will be zeroed.Thank you so much for helping me.
Merry Christmas
- Ashish_Mathur8 years agoSuper User
Hi,
There is some problem with your measure "Calc Sugestão de Compras". When i select All Stores and also drag this measure to the last table, i see all negative values for Store Aldeota.
Please check that measure.
- leudyston8 years agoHelper I
Okay, I discovered the problem, as far as CALC SUGESTÃO COMPRAS, the ESTOQUE ATUAL measure that is part of the measures that generate the CALC SUGESTÃO COMPRAS is with filters wrong, so the solution you gave me is very correct.
Thank you so much!!
Merry Christmas!!