Forum Discussion
Anonymous
8 years agoNot applicable
Modified 'Basket Analysis' - don't count when Item = Filter Item
Hi, I have a list containing Order Number and Materials, where I need to figure out how many orders have the same pair of materials. I've solved this using a Basket Analysis which works, wher...
- 8 years ago
Hi Anonymous
Add EXCEPT ( Materiale_Filter; Material ) to CALCULATETABLE - see below.
By the way, I would have expected ALL ( Materiale ) rather than ALL ( 'Sales' ) in the standard Basket Analysis measure pattern, as you would clear filters other than Materiale. But if it works for you that's fine
Orders with both products = CALCULATE ( DISTINCTCOUNT ( 'Sales'[Order number] ); CALCULATETABLE ( SUMMARIZE ( 'Sales'; Sales[Order number] ); ALL ( 'Sales' ); USERELATIONSHIP ( 'Sales'[Materials]; Materiale_Filter[Materials] ); EXCEPT ( Materiale_Filter; Materiale ) ) )s
OwenAuger
Super User
8 years agoHi Anonymous
Add EXCEPT ( Materiale_Filter; Material ) to CALCULATETABLE - see below.
By the way, I would have expected ALL ( Materiale ) rather than ALL ( 'Sales' ) in the standard Basket Analysis measure pattern, as you would clear filters other than Materiale. But if it works for you that's fine
Orders with both products =
CALCULATE (
DISTINCTCOUNT ( 'Sales'[Order number] );
CALCULATETABLE (
SUMMARIZE ( 'Sales'; Sales[Order number] );
ALL ( 'Sales' );
USERELATIONSHIP ( 'Sales'[Materials]; Materiale_Filter[Materials] );
EXCEPT ( Materiale_Filter; Materiale )
)
)s
buchisar
8 years agoFrequent Visitor