Forum Discussion
Help
Check this out, you have the name of the vendor in your Mat Description, you create a duplicate of your material and split it into the first part until vendor and last part with vendor, then you split the vendor column into one part of the vendor itself, then you compare them, if it is the same, then you take the base Mat description, without vendor name, if they are not the same then you take material as it was.
Might be a bit confusing, but check the power query and if you still have questions, let me know.
Thanks Olgad, I have applied the power query and achieved a common Material description for both materials as highlighted below. However the Total receipts are still summed up individually
- olgad2 years agoResident Rockstar
the only thing that comes to my mind, go back to power query , select Material description and trim it, may be a space is left somewhere and pbi still treats it as two separate materials.
because we have identical measure and for me it works
- Anonymous2 years agoNot applicable
Thank you Olgad, been very helpful! I trimed and for some reason i seem to get the right total receipt now. However it seem to be static and not affected when you play around with the date as seen in the second screenshot
- Anonymous2 years agoNot applicable
Hi Anonymous ,
Thank you olgad for the quick response and solution. Here are some of my additions:
Please try this measure:
Total Receipts = var NumofVendors=CALCULATE(COUNT(bw_csp_act[vendor]),ALLSELECTED(bw_csp_act[vendor])) var NumofMaterial=CALCULATE(COUNT(bw_csp_act[MatNr]),ALLEXCEPT(bw_csp_act,'bw_csp_act'[Material-Description])) RETURN IF(NumofVendors>1, CALCULATE(SUM('bw_csp_act'[BUoM_Act_DistrReceipts]),ALLSELECTED('bw_csp_act'[vendor])), IF(NumofMaterial>1,CALCULATE ( SUM ( bw_csp_act[BUoM_Act_DistrReceipts] ), FILTER ( ALLSELECTED ( bw_csp_act ), bw_csp_act[Material-Description] = SELECTEDVALUE ( bw_csp_act[Material-Description] ) )),SUM(bw_csp_act[BUoM_Act_DistrReceipts])))If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.