Basket Analysis Matrix

jak82

Board Regular
Joined
Apr 28, 2016
Messages
146
Is there a way to do a basket analysis matrix in powerpivot or an addon that does it for you, our minds are blown.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks Michael, I am trying to replicate the tutorial here

Basket Analysis – DAX Patterns

But it doesn't seem to like my DAX any ideas?


Code:
=CALCULATE (
    DISTINCTCOUNT ( AdDetails[adnumbr] ),
    CALCULATETABLE (
        SUMMARIZE ( AdDetails, AdDetails[adnumbr] ),
        ALL ( titles ),
        USERELATIONSHIP ( AdDetails[ttlname], 'FilterTitle'[filter filterttlname])
    )
)

It doesn't seem to like the filter function next to filterttlname

Thanks

C
 
Upvote 0
It doesn't seem to like the filter function next to filterttlname

There is no filter function in your formula. There is a USERELATIONSHIP that is using a relationship override between the AdDetails table and the 'FilterTitle' table. Is that what you intended? Have you created the inactive relationship in the data model?
 
Upvote 0
There is no filter function in your formula. There is a USERELATIONSHIP that is using a relationship override between the AdDetails table and the 'FilterTitle' table. Is that what you intended? Have you created the inactive relationship in the data model?


Thanks Guys Michael, that looks like a proof of concept, don't think there is actually a tool yet :(

Matt, I have created the inactive Link, when I add the filter to the formula

Code:
=CALCULATE (
    DISTINCTCOUNT ( AdDetails[adnumbr] ),
    CALCULATETABLE (
        SUMMARIZE ( AdDetails, AdDetails[adnumbr] ),
        ALL ( titles ),
        USERELATIONSHIP ( AdDetails[ttlname], 'FilterTitle'[ filter filterttlname] )
    )
)

I get the error message I thinks filter is part of the column name it doesn't seem to recognise it as a function.

Thanks
 
Upvote 0
The word FILTER can be a function, but only if you use it right. The first occurrence of FILTER it is encapsulated in single quotes ie 'FilterTitle'. In this case, it is not a function but a part of the table name. In the second use of the word FILTER you have it encapsulated in square brackets. in this second case it is part of a Column Name that belongs to the table mentioned previously. If you want to use FILTER as a function, then you should not encapsulate it this way and always use the arguments that go with the function

FILTER(TABLE, filter expression)
 
Upvote 0
The word FILTER can be a function, but only if you use it right. The first occurrence of FILTER it is encapsulated in single quotes ie 'FilterTitle'. In this case, it is not a function but a part of the table name. In the second use of the word FILTER you have it encapsulated in square brackets. in this second case it is part of a Column Name that belongs to the table mentioned previously. If you want to use FILTER as a function, then you should not encapsulate it this way and always use the arguments that go with the function

FILTER(TABLE, filter expression)

Thanks Matt, got it working
 
Upvote 0

Forum statistics

Threads
1,215,193
Messages
6,123,560
Members
449,108
Latest member
rache47

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top