Forum Discussion

PrakharJain21's avatar
PrakharJain21
New Member
6 years ago
Solved

How to calculate Distribution with Drop Size using PowerBi Reports?

My data has date-level, customer-level, product level invoicing data and I often have to count the number of customers where the following criteria is fulfilled:

 

Operation: Count of customers for whom the following is true....

1) Product : Only Product A purchased

2) Sale Volume: At least 10 units

3) Period: This Month

 

 The above table should return a solution of "2" 

logic:

- Customer 1 has purchased total 10, hence Yes

- Customer 2 has purchased total 10, hence Yes

- Customer 3 has purchased 0, hence no

- Customer 4 has purchased total 5, hence no

 

Request the assistance of this community to help me understand how do i achieve this using a measure? Thanks in advance!

  • Anonymous's avatar
    Anonymous
    6 years ago

    HI,

     

    try with this one:

     

    # Customers Prod A > 10 =
    COUNTX(
        FILTER(
            CALCULATETABLE(
                SUMMARIZE(
                    Sales,
                    Sales[CustomerID],
                    "Product A Sales",
                    SUM(Sales[Sales])
                ),
                Sales[Product Type] = "Product A"
            ),
            [Product A Sales] >= 10
        ),
        [CustomerID]
    )
     
    Regards
    Lorenzo

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI,

     

    try with this one:

     

    # Customers Prod A > 10 =
    COUNTX(
        FILTER(
            CALCULATETABLE(
                SUMMARIZE(
                    Sales,
                    Sales[CustomerID],
                    "Product A Sales",
                    SUM(Sales[Sales])
                ),
                Sales[Product Type] = "Product A"
            ),
            [Product A Sales] >= 10
        ),
        [CustomerID]
    )
     
    Regards
    Lorenzo