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

I have implemented basket analysis in my report. want to calculate sales of that customers?

Hi All,

 

I have implemented basket analysis and getting the required cross-sell for the products. Now I want to calculate the sales amount for the products.

 

Can someone please help me out to find the sales measure. See the screenshot of the model that I have used.

I have created the cross sell measure for calculating the count of customers as below: 

 

CrossSell Customer Count = CALCULATE (
DISTINCTCOUNT( SalesFact[CustomerID]),
CALCULATETABLE (
SUMMARIZE (
'SalesFact',
SalesFact[CustomerID]
),
ALL ( ProdFilter ),
USERELATIONSHIP ( SalesFact[ProductKey], ProdFilter2[Product2Name] )
)
)

 

In the given case the CrossSellLIV should be :

Monthnumber    CrossSell Customer Count    CrossSellSales            Expected CrossSell Sales

M1                            2                                                30                                40

M2                            1                                                20                                30

 

 

ModelModel

Please see the expected result for sales by checking data in the Reference table.

 

 

Expected result is shown in orange color columnExpected result is shown in orange color column

 

 

 

 

 

 

 

 

 

 

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous ,

 

You may take a look at https://www.sqlbi.com/articles/apply-and-logic-to-multiple-selection-in-dax-slicer/.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-chuncz-msft ,

 

The link provided by you works if I have only one slicer in the report. But in my case, I am having two slicers for Product 1 and Product 2. So this doesn't work in my case.

 

Thank You. 

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.