Forum Discussion
BIN Range / Dynamic Segmentation based on measure
- 6 years ago
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.
Anonymous ,
Could you please share the two tables sample data and give the expected result?
Regards,
Jimmy Tao
- Anonymous6 years agoNot 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-msft6 years ago
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.
- Anonymous6 years agoNot applicable
Hi
This is really helpful. It made my work easy but I would also like to see the store ID's that made total sales in that particular range (Gold,Platinum,Silver) for selected year.
For example I want to see what all storeIDs made total sales in the gold range for 2019.
- Ashish_Mathur6 years ago
Super User
Hi,
There should be only 1 store in the Gold bucket - StoreID 2. You may download my PBI file from here.
Hope this helps.