Forum Discussion
How to group customers dynamically based on slicer values
- 5 years ago
Create a table using the "Enter data" option in the Home ribbon and type in the groups (let's call it 'Grouping Table'):
Group Order
Top 4 1
Top 5-8. 2
Top 9-10 3
(Use the order field to sort the table: select the column Group and use the "Sort column by" option in table view)
You can use this table as a slicer if need be.
Next create a measure including the grouping values:
Grouping Values=
VAR Top4 = CALCULATE([Revenue], FILTER(Table, [Rank] < 5))
VAR Top5to8 = CALCULATE([Revenue], FILTER(Table, [Rank] > 4 && [Rank] < 9))
VAR Top9to10 = CALCULATE([Revenue], FILTER(Table, [Rank]>8 && [Rank] <11))
RETURN
Switch(TRUE(),
Grouping Table [Group] = "Top 4", Top4,
Grouping Table[Group] = "Top 5-8", Top5to8,
Top9to10)
now create a table visual with the Grouping Table[Group] field and the [Grouping Values] measure
Hi SravaniG
If the above posts help, please kindly mark it as a answer to help others find it more quickly. thanks!
If not, please kindly elaborate more.