Forum Discussion
Grouping values from measures
Hi,
I have a table that looks something like this:
| AccountID | UserID | Visits | Help requests |
| abc | 111 | 5 | 0 |
| abc | 456 | 0 | 1 |
| abc | 789 | 15 | 2 |
| def | 555 | 2 | 2 |
| def | 666 | 0 | 1 |
I then have a measure that calculates a 'health score' for each account based on how many visits the users from each account make to the website and how many times they ask for help.
When I display the measure in a table with another column showing the account name then I get a health score for each account, EG:
| AccountID | Health Score |
| abc | 20 |
| def | 7 |
| ghi | -55 |
| jkl | 2 |
| mno | 1 |
What I'd like to do is count how many accounts have health scores in different bands. Eg to show a pie chart that shows how many accounts have a score below zero, how many have a score between 0 and 75, and how many are 76 and over.
Is it possible to do such a calculation based on values in a measure? I'm stuck and any help is greatfully received!
Thank you :)
You should be able to do it like this:
Table = SUMMARIZE('TABLE','TABLE'[Column],"MyMeasure",[Measure])
16 Replies
- Greg_DecklerCommunity Champion
So, you should be able to create a table using SUMMARIZE that includes this measure and do your grouping that way. Or create another table with your categories and do a count in that table that fit the defined criteria.
- RichardPHelper I
Hi Greg_Deckler,
Thank you for such a quick reply :)
When I try with SUMMARIZE I don't have an option to do it on the basis of a Measure - it looks like it is only available for table columns.
- Greg_DecklerCommunity Champion
You should be able to do it like this:
Table = SUMMARIZE('TABLE','TABLE'[Column],"MyMeasure",[Measure])