Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

support value by visit frequency in basket analysis

Hi ,
 
I try to calulate the support value for my basket analysis.
I want to know which products the customers bought together, depending on how often they visited the store.
 
I have several columns:
Item1 and Item2, the customer ID and a rank column, which says how often they visited within one month.
 
Below is the DAX expression I tried to calculate this value, but I just get the overall support value, and not the support by rank
___________________________________________________________________________
support  =
var item1 = [Item1]
var item2 = [Item2]
var transactionWithItem1 =
SELECTCOLUMNS(FILTER(table, table[product] = item1), "customerID", [customerID], "rank",[rank])
var transactionWithItem2 =
SELECTCOLUMNS(FILTER(table, table[product] = item2), "customerID", [customerID], "rank",[rank])
var transactionWithBothItems = INTERSECT(transactionWithItem1, transactionWithItem2)
Return COUNTROWS(transactionWithBothItems) / DISTINCTCOUNT(table[customerID])
___________________________________________________________________________
 
thanks
3 REPLIES 3
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Could you please share your sample data and expected result to me if you don't have any Confidential Information? Please upload your files to OneDrive for Business and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Ashish_Mathur
Super User
Super User

Hi,

Share a simple dataset, explain the business logic and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.