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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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