Forum Discussion
Verify Cross-Selling
- 8 years ago
Hi, One Way is this:
Step 1: Add a New Table with Cod Prod
Modeling - New Table
CodProdTable = DISTINCT(Table1[Cod Prod])
Step 2
Add a measure
FilterM = COUNTROWS ( SUMMARIZE ( FILTER ( Table1; CALCULATE ( COUNT ( Table1[Cod Prod] ); FILTER ( ALLEXCEPT ( Table1; Table1[Sales Code] ); Table1[Cod Prod] = SELECTEDVALUE ( CodProdTable[Cod Prod] ) ) ) > 0 ); Table1[Sales Code] ) )Step 3: And in Visual Level Filter Add this Measure To Is Not Blank
- 8 years ago
Another Way is Replacing Step 2 with.
FilterM = COUNTROWS ( INTERSECT ( CALCULATETABLE ( VALUES ( Table1[Cod Prod] ); ALLEXCEPT ( Table1; Table1[Sales Code] ) ); VALUES ( CodProdTable[Cod Prod] ) ) )Regards
Victor
Hi carlosarmpb,
Based on the image you are showing if you select on the slicer the code 1000 the table will be filter out for the products where prod_code is 1000.
What is your expected result and what are your particular requests.
Regards,
MFelix
Yeah, that's fine.
But I want this table also to show all the product codes that have the same sales code.
- Vvelarde8 years agoCommunity Champion
Hi, One Way is this:
Step 1: Add a New Table with Cod Prod
Modeling - New Table
CodProdTable = DISTINCT(Table1[Cod Prod])
Step 2
Add a measure
FilterM = COUNTROWS ( SUMMARIZE ( FILTER ( Table1; CALCULATE ( COUNT ( Table1[Cod Prod] ); FILTER ( ALLEXCEPT ( Table1; Table1[Sales Code] ); Table1[Cod Prod] = SELECTEDVALUE ( CodProdTable[Cod Prod] ) ) ) > 0 ); Table1[Sales Code] ) )Step 3: And in Visual Level Filter Add this Measure To Is Not Blank
- Vvelarde8 years agoCommunity Champion
Another Way is Replacing Step 2 with.
FilterM = COUNTROWS ( INTERSECT ( CALCULATETABLE ( VALUES ( Table1[Cod Prod] ); ALLEXCEPT ( Table1; Table1[Sales Code] ) ); VALUES ( CodProdTable[Cod Prod] ) ) )Regards
Victor