Forum Discussion
Wrong Total
IsmaelConsult First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
- IsmaelConsult3 years agoFrequent Visitor
Greg_Deckler
I try with this metric:Valor Estoque =VAR UltimoCusto = CALCULATE(LASTNONBLANK(Saldos[Preco_Custo_Medio]; 0);VALUES(Produtos[Nome_Produto]);FILTER(ALL(Saldos);Saldos[Data_Movimento] = MAX( Saldos[Data_Movimento]));ALL('Calendar'))VAR _VlrEstoque = [Saldo_Retro]*UltimoCustoVAR _Table = SUMMARIZE(VALUES(Produtos[Nome_Produto]);"_value";_VlrEstoque)RETURNIF(HASONEVALUE(Produtos[Nome_Produto]);_VlrEstoque;SUMX(_Table;_VlrEstoque))
But not works.- Greg_Deckler3 years agoCommunity Champion
IsmaelConsult Can't do it like that, that's not how VAR's work. Use 2 separate measures like in the example.
- IsmaelConsult3 years agoFrequent Visitor
I separated the measurements but it didn't work, here's the link to the file so you can analyze it better. I also changed the column and measurement names to English.
https://drive.google.com/file/d/1wdZ1YnBT2BqekXoaPc3yZhkpth_X5i83/view?usp=share_linkI need to calculate the inventory on the selected date. Physical inventory and inventory value.
I can calculate the measurements, but the totals are not adding up
Thanks,