Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

BIN Range / Dynamic Segmentation based on measure

I have StoreId's and their sales(column name = RetailDollars). I have created a measure for totalsales - 

Totalsales$ = SUM(SellThrough[RetailDollars]) 
I have created a BIN
 

 

 

 

 

Then created a measure to count the number of stores

Sheet1(2) is Bin table name and sell through is sales tables name.

Results is showing something like this

 

 

 

 

which is not accurate.

 

Could someone please help me solve this issue ?
FYI : I have converted storeId's column to text which are actual numbers.

  • Anonymous ,

     

    You can simply create a calculate column in the sales table using dax as below:

    Number of stores = CALCULATE(COUNT('Table'[StoreID]), FILTER('Table', 'Table'[Sales] >= Bin[Min_Value] && 'Table'[Sales] <= Bin[Max_Value]))

     

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

6 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Anonymous ,

     

    Could you please share the two tables sample data and give the expected result?

     

    Regards,

    Jimmy Tao

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Jimmy,

       

      This is my sample data set

       

       

       

       

       

       

      I would like to see how many stores made sales between 0 to 5000, 5000 to 50,000 and >50,000.

       

      Expected result

       

      • v-yuta-msft's avatar
        v-yuta-msft
        Community Support

        Anonymous ,

         

        You can simply create a calculate column in the sales table using dax as below:

        Number of stores = CALCULATE(COUNT('Table'[StoreID]), FILTER('Table', 'Table'[Sales] >= Bin[Min_Value] && 'Table'[Sales] <= Bin[Max_Value]))

         

        Community Support Team _ Jimmy Tao

        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.