- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Calculate the rank based on number of times a value occurs in a column (excluding specific values)
Hi everyone, I'd like to receive some assistance please
Background
I have a column of Occupation data that contains various reported responses.
New column created
So far, I have created a new column that counts the number of times each reported response occurs in the 'Occupation' column.
I would like to create a new column (or a new measure) that calculates the rank (based on the count of the number of times that each reported response occurs in the 'Occupation' column) - however it has to exclude the following reported responses:
- Not Stated
- Not Previously Employed
What I have created so far
I have currently created a new column called Rank_Count_Occupation that calculates the rank, however it does not exclude the 2 responses mentioned above.
Ranking | Occupation | Number of arrivals |
1 | Not Stated | 4891 |
2 | Non Working Child | 4522 |
3 | Not Previously Employed | 4114 |
4 | Occupation Unknown | 3526 |
5 | Home Duties | 1846 |
Ranking | Occupation | Number of arrivals |
Not Stated | 4891 | |
1 | Non Working Child | 4522 |
Not Previously Employed | 4114 | |
2 | Occupation Unknown | 3526 |
3 | Home Duties | 1846 |
Seeking your assistance
I think I'm 80% of the way there with the new columns I have created up to this point but need to add in one last thing to the current DAX code to exclude the 'Not Stated' and 'Not Previously Employed' responses.
Thanks all
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This measure works
Measure 1 = RANK(DENSE,FILTER(ALL('ALL Arrivals data'[Grouping_Occupation]),'ALL Arrivals data'[Grouping_Occupation]<>"Not stated"&&'ALL Arrivals data'[Grouping_Occupation]<>"Not previously employed"),orderby([Count_Occupation_],DESC))
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Share the download link of the PBI file.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This measure works
Measure 1 = RANK(DENSE,FILTER(ALL('ALL Arrivals data'[Grouping_Occupation]),'ALL Arrivals data'[Grouping_Occupation]<>"Not stated"&&'ALL Arrivals data'[Grouping_Occupation]<>"Not previously employed"),orderby([Count_Occupation_],DESC))
Hope this helps.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you so much for your help - your measure did the job nicely 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are welcome.
Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
