Forum Discussion
Anonymous
6 years agoNot applicable
Sum a multiplication with if
Hi everyone, I am a newbie at Power BI, very used to Qlik but have to change software. I have an issue with a formula of that type : sum(quantity*if(cost_a<>0;cost_a;cost_b)). To do that, I ha...
- 6 years ago
Anonymous Try like. maxx
sumx(SUMMARIZE(ARTICLES;ARTICLES[ART_code];"M1";maxx(ARTICLES;if('ARTICLES'[ART_PRI]<>0; 'ARTICLES'[ART_PRI];'ARTICLES'[ART_PRI_Exact])); "M2";sum('TRANSACTION'[V_qte]));[M1]*[M2])
amitchandak
Super User
6 years agoAnonymous Try like. maxx
sumx(SUMMARIZE(ARTICLES;ARTICLES[ART_code];"M1";maxx(ARTICLES;if('ARTICLES'[ART_PRI]<>0; 'ARTICLES'[ART_PRI];'ARTICLES'[ART_PRI_Exact]));
"M2";sum('TRANSACTION'[V_qte]));[M1]*[M2])
Anonymous
6 years agoNot applicable
Hi amitchandak
thank you for your quick answer ! 🙂 I had an error first with MAXX that's why I put only MAXX (did not understand there were 2 different functions, sorry). I have no more error on the measure but it can't be shown on the screen : there is another error "la fin de l'entrée a été atteinte" which could be translated by "the end of the entry has been reached". Any idea ?
thank you very much,
Delphine