Forum Discussion
Anonymous
2 years agoNot applicable
Help
Hi in the above, i have in yellow a material with the same code coming from two suppliers and in blue i have a amaterial which have different code and is coming from different buyers. I have...
olgad
Resident Rockstar
2 years agoHi,
provided you have the same material number or description, because right now your material description is technically different because it contains vendor names, you can use the following:
Total BUom_Act_DistReceipts 2 =
var NumofVendors=CALCULATE (Count( T1[Vendor] ),ALLSELECTED( T1[Vendor] ))
var NumofMaterial=CALCULATE (Count( T1[GCAS] ),ALLEXCEPT(T1, T1[Mat Descr] ) )
RETURN
if(NumofVendors>1,
CALCULATE (SUM ( T1[Dist receipts] ),ALLSELECTED ( T1[Vendor] )),
if(NumofMaterial>1,
CALCULATE (SUM ( T1[Dist receipts] ),ALLExcept ( T1,T1[Mat Descr] )),
Sum(T1[Dist receipts])))
- Anonymous2 years agoNot applicable
Thank you Olgad, appreciate your response. You are totally right as these materials appear to be different in all attribute(code, description and vendor). However it is a peculiar situation i have been tasked with and my understanding is that i have to find something unique to these materials or create something unique myself. Your query however works where i have same description, thanks. If you think of something else that can help in this situation, i'd appreciate the thought.