Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Related Distinct Count

I'm trying to compute how many of our individuel product categories a customer has used, but I'm not getting the expected result. Attached image is a good of the data model in a classic setup with P...
  • Vvelarde's avatar
    Vvelarde
    8 years ago

    Anonymous

     

    Hi, you can use two measure like this:

     

    Main Groups Used =
    CALCULATE (
        DISTINCTCOUNT ( 'Product'[ProductMainGroup] );
        CROSSFILTER ( 'Fact'[ProductID]; 'Product'[ProductId]; BOTH )
    )

     

    Sub Groups Used =
    CALCULATE (
        DISTINCTCOUNT ( 'Product'[Product Sub Group] );
        CROSSFILTER ( 'Fact'[ProductID]; 'Product'[ProductId]; BOTH )
    )

     

    Regards 

     

    Victor

    Lima - Peru