Forum Discussion

milpro011's avatar
milpro011
Helper I
7 years ago
Solved

Fixed bins on dynamically selected data

Hi, I have a sales table with data of the lowest granularity (salesperson, client, product, date, amount, quantity, etc.)

With several on-page filters, I have a simple output table: 

 

Column 1 - Salesperson
Column 2 - # of products sold

 

I'm looking to create several bins based on products sold to plot a histogram, for instance
1) 1 - 6 products sold

2) 7 - 13 products sold, etc.

 

so that I can say, 20 sales reps sold 1-6 products, 30 sales reps sold 7-13, etc. 

 

Is this possible to build such a graph without derived tables, simply using measures for instance? 

 

Thank you!

4 Replies

    • milpro011's avatar
      milpro011
      Helper I

      vanessafvg thanks!

       

      A simplified dataset is along the following lines (sorry, I can't paste the actual data for privacy reasons). 

       

      Year  |    Salesperson    |   Product |  Lot# |   Qty 

      2019         Joe                   Cups        A1         3

      2019         Joe                   Cups        A2         4

      2019         Matt                 Cups        A1         4

      2019         Matt                 Cups        A5        4

       

      With filters :

      Year: 2019

      Product: Cups

       

      And using a regular PowerBi table, data is reduced to:

      Salesperson | Qty

      Joe                7

      Matt              8

      James            3

      Greg              2

      Mitch             9

      etc.

       

      I'm looking to bucket and count how many sales reps have sold a certain amount of product

       

      If we have 2 buckets: 1-6 and 7-13, we would have the answer 

      Bucket | # of Salespeople

       

      1-6               2

      7-13             3 

       

      Thanks!