Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Comparing two tables without relationship using a venn diagram, measure not showing values

I'm trying to produce a venn diagram to show differences of what products a customer has uploaded to their systems. But my venn diagram is not working with the follwing measure.

 

 

 

Product file

MarketIDCountryIDProductCodeLastUpdatedDate
216532640100121/12/2017 00:00
216532640101616/12/2016 00:00
216532640102007/12/2021 00:00
216532640102127/03/2019 00:00
216532640102416/12/2016 00:00
216532640103010/12/2021 00:00
216532640103412/09/2018 00:00
216532640104712/09/2018 00:00
216532640104929/07/2020 00:00
216532640105207/12/2021 00:00
216532640105329/07/2020 00:00
216532640105529/10/2021 00:00
216532640105707/03/2019 00:00
216532640105829/07/2020 00:00
216532640105929/10/2021 00:00

 

 

 

 

 CustomerFile data
MarketIDCountryIDProductCodeLastUpdated
216532640100109/12/2021
216532640102009/12/2021
216532640102109/12/2021
216532640103409/12/2021
216532640104709/12/2021
216532640104909/12/2021
216532640105209/12/2021
216532640105309/12/2021
216532640105509/12/2021
216532640105709/12/2021
216532640105809/12/2021
216532640105909/12/2021
216532640106309/12/2021
 
 
Overlap = VAR Market = VALUES(ProductFile[MarketID])
VAR Country = VALUES(ProductFile[CountryID])
VAR Prod = VALUES(CustomerFile[ProductCode])
VAR Intersection = INTERSECT(Market,Country)
RETURN
COUNTROWS(Intersection)
 
Help appreciated
  • Hi Anonymous ,


    I seem to have some trouble understanding it. According to your test data, for the INTERSECT function returns a table that contains only the rows that are present in both table expressions as arguments. Thus causing the result returned by your formula to be empty.

    A situation similar to the following is required:


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Overlap = COUNTROWS(INTERSECT(VALUES(CustomerFile[ProductCode]),VALUES('Product File'[ProductCode])))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you can I add a slicer on this as I have different customers and these customers are in different countries, how can I do that would Ihave to have slicers for each product file and customer file?

       

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        Yes, the simple way is to have separate slicers.

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,


    I seem to have some trouble understanding it. According to your test data, for the INTERSECT function returns a table that contains only the rows that are present in both table expressions as arguments. Thus causing the result returned by your formula to be empty.

    A situation similar to the following is required:


    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.