Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm not sure why this is so non-intuitive...
Sample Data:
Fname | Lname | JobTitle |
Bob | Smith | Carpenter |
Sally | Jones | Carpenter |
Yvonne | Brinkley | Blacksmith |
Goal:
- Create a DAX Measure that defines unique JobTitles
- Add a slicer of unique Job Titles to dashboard
Tried so far:
- This should be as easy as creating the following measure...
UNIQUE_JOBTITLES = DISTINCT('SAMPLE_DATA'[JobTitle])
- ...or slightly less intuitively...
UNIQUE_JOBTITLES = VALUES('SAMPLE_DATA'[JobTitle])
- ...then applying the measure to the Slicer visual.
Which mystic formulae am I missing here?
Thank you
Solved! Go to Solution.
Hi, @ericOnline
I think the first thing you should keep in mind is that the goal of creating a measure is to calculate the value based on the DAX formula. And measure can't be placed in Slicer. So I think maybe creating measures is not a good solution. To get the distinct value of the column [JobTitle], I think creating a calculated table is the best way to achieve this, you can try my steps:
Table 2 =
SUMMARIZE('Table','Table'[JobTitle])
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @ericOnline
I think the first thing you should keep in mind is that the goal of creating a measure is to calculate the value based on the DAX formula. And measure can't be placed in Slicer. So I think maybe creating measures is not a good solution. To get the distinct value of the column [JobTitle], I think creating a calculated table is the best way to achieve this, you can try my steps:
Table 2 =
SUMMARIZE('Table','Table'[JobTitle])
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ericOnline You can't use a measure to create a slicer - only columns can be used for slicers, axis, legend, etc. As @Fowmy mentioned, you don't need to create any formula for this to work. If you do need a table of distinct values, create a new TABLE not a new MEASURE. Power BI Order of Operations
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@ericOnline
You do not need a formula, drag and drop the Job Title Column to a slicer, it will show you the distinct values.
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
27 |
User | Count |
---|---|
92 | |
50 | |
44 | |
40 | |
35 |