Forum Discussion

renatopnovaes's avatar
5 years ago
Solved

Check another table

I'm setting up a conference between two tables. The target table and the sales table. I did a merge, I was able to say if the goal was completed or not. But if the seller sells the same product one more time, a merged line will be added.

 

Sell Table

CustomerValue
41Water
41Lemon
41Water
41Orange

 

Goals Table

 

CustomerValue
41Water
41Grape
41Orange
41Apple

 

I would like to make this conference, but if the seller sells the same product twice. Duplicate the product and I can't tell you what the seller's goal status is like. Can I make this conference without the data being repeated?

  • Anonymous's avatar
    Anonymous
    5 years ago

    As SELLOUT_D is your right table, in your join step, you can surround SELLOUT_D like this:

     

    Table.NestedJoin(#"Metas Julho", {"CLIENTE", "PRODUCTO"}, Table.Distinct(SELLOUT_D, {"CODIGO", BASE_SKU_GRUPO"}), {"CODIGO", BASE_SKU_GRUPO"}, "SELLOUT_D", JoinKind.LeftOuter)

     

    --Nate

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    As SELLOUT_D is your right table, in your join step, you can surround SELLOUT_D like this:

     

    Table.NestedJoin(#"Metas Julho", {"CLIENTE", "PRODUCTO"}, Table.Distinct(SELLOUT_D, {"CODIGO", BASE_SKU_GRUPO"}), {"CODIGO", BASE_SKU_GRUPO"}, "SELLOUT_D", JoinKind.LeftOuter)

     

    --Nate

  • edhans's avatar
    edhans
    Community Champion

    What do you mean conference? You mean relationship? 
    How did you merge - on the customer or the customer and product field?
    What do you want the results to look like? None of your data has duplicates as you describe in your question.

    How to get good help fast. Help us help you.

    How To Ask A Technical Question If you Really Want An Answer

    How to Get Your Question Answered Quickly - Give us a good and concise explanation
    How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.

  • Yes, I merged. This image below merged the goals and added the sales. But when a customer repeats the purchase of a product from the target, it would double...

    After fusion and duplicate sells

     

  • Anonymous I couldn't implement this formula...

     

    In this step by step I created a sales verifier, if it contains the customer code in the SELL VERIFY column it means that I sold a product to that customer. But I only need to sell one product to the customer, so... I wanted to remove the repeaters.

     

    Sorry guys for the bad wording of my question, I'll improve!