Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello friends,
I am having a problem in SUGESTÃO DE COMPRAS measurement When in my context only one store is being filtered, the measure works correctly not subtracting the negative values and appearing zeroed. However, when filtering more than one store, as in the example below, the stores ALDEOTA and MESSEJANA, the measure subtracts the negative value of a store by the positive of another store, changing the TOTAL, but there should be no such subtraction, precisely because negative values were replaced by "0".
Sugestão de Compras = IF( HASONEVALUE(ditens[Tamanho]); IF( [Calc Sugestão de Compras]>=0; [Calc Sugestão de Compras];0 ); SUMX( SUMMARIZE( VALUES(ditens[Tamanho]); [Tamanho]; "AgrupaTamanho"; IF( [Calc Sugestão de Compras]>=0; [Calc Sugestão de Compras];0 ) ) ;[AgrupaTamanho] ) )
Can anyone help me with this problem?
I am making available the .pbix file and below the explanatory image.
Solved! Go to Solution.
In this scenario, I don't think it's possible to control the sub total result with DAX. On each row level total, it still takes the slicer from ditens[Tamanho]. So it will always calculate all [Calc Sugestão de Compras] then apply the condition, the logic can never go to this part:
SUMX( SUMMARIZE( VALUES(ditens[Tamanho]); [Tamanho]; "AgrupaTamanho"; IF( [Calc Sugestão de Compras]>=0; [Calc Sugestão de Compras];0 ) ) ;[AgrupaTamanho] )
Regards,
In this scenario, I don't think it's possible to control the sub total result with DAX. On each row level total, it still takes the slicer from ditens[Tamanho]. So it will always calculate all [Calc Sugestão de Compras] then apply the condition, the logic can never go to this part:
SUMX( SUMMARIZE( VALUES(ditens[Tamanho]); [Tamanho]; "AgrupaTamanho"; IF( [Calc Sugestão de Compras]>=0; [Calc Sugestão de Compras];0 ) ) ;[AgrupaTamanho] )
Regards,
User | Count |
---|---|
91 | |
74 | |
67 | |
63 | |
55 |
User | Count |
---|---|
99 | |
88 | |
72 | |
60 | |
59 |