none
DAX - Advanced Product Grouping/Segmentation Question RRS feed

  • Question

  • I created an SSAS Tabular model using the AdventureWorksDW database.

    I used the post below to help me build the report.

    https://blog.gbrueckl.at/2014/02/applied-basket-analysis-in-power-pivot-using-dax/

    Sold in same Order:=
    CALCULATE (
    COUNTROWS ( 'Internet Sales' ),
    CALCULATETABLE ( 
    SUMMARIZE ( 
    'Internet Sales',
    'Internet Sales'[SalesOrderNumber]
    ),
    ALL ( 'Product' ) ,
    USERELATIONSHIP( 'Internet Sales'[ProductKey],FilteredProduct[ProductKey])
    )
    )
    

    I have validated that the results from the formula are correct. There are 1,381 orders with the Touring Tire Tube sold and shows me how many orders were sold with the other items (e.g. 170 out of the 1,381 orders also included product key 214 - Sport-100 Helmet, Red).

    enter image description hereHere is where I'm having an issue. I would like to summarize my data by showing how many of the orders only included my filtered items vs. orders sold with other products. This has to be dynamic since users can select any products... The end result should look like this:

    enter image description here

    I'm new to DAX and have struggled with this for a few hours. Thanks for your help

    Thursday, November 29, 2018 7:38 PM

All replies

  • Hi TitoRod,

    Please have a check following links and if it helps:

    Dynamic Segmentation

    Basket Analysis

    Regards,

    Pirlo Zhang 


    MSDN Community Support<br/> Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact <a href="mailto:MSDNFSF@microsoft.com">MSDNFSF@microsoft.com</a>.

    Friday, November 30, 2018 7:14 AM
  • Hi - I had previously looked at those links.  Couldn't figure out how to incorporate the logic.
    Wednesday, December 5, 2018 12:53 PM