• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Get number of instance based on two condition

Junarkar

Member
Hi

Below is the data.

POS ReceiptBrand DescArticle TypeArticle DescQty.Net Sales
BLC01805001234ccccZPPPE-Elica Cooktop
1​
1,500​
BLC01805001234OnstZXXXEW- Cooktop
1​
201​

Based on this I want the below result;
BrandSaleQty
cccc
1500​
1​
xxxx
yyyy

The sale of Brand "cccc" should come only if "Onst" is included in the same invoice (like in the example). In some cases "Onst" will be missing. Which should be excluded from the result.

Any possibility without using VBA.

Thanks
Junarkar
 
Junarkar,

If "Onst" is always in the second line of the POS receipt, we can use Power Query to achieve what you want, if it appear any line, I will need to use other workaround in PQ to achieve what you want
 

Attachments

  • Get_No_instance_2_conditions.xlsx
    21 KB · Views: 1
Junarkar
Where comes those xxxx and yyyy?
Should the result look just as in Your wanted sample?
Oh..you may ignore that.. Sorry for the wrong data.

And in the result - Sales & Qty are the sales & Qty of Onst. As pet the example it Sales should be 201 & Qty should be 1 for brand "cccc". Can we do it without power query & VBA. Just curious.
 
Junarkar
... just curious,
... ... do You know,
... ... ... what do You would like to get?
... ... ... and from what?
( You wrote that the wrong data and ... the result ... is still mystery! )
What is connection with Discuss Data Visualizations and Charting?
 
Last edited:
Back
Top