Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everybody,
I'm a DAX and BI newbie, so please forgive me if this is this is a "duh" moment.
In learning DAX, I created a Matrix table that lists "Yearly Income" ranges on rows and then I created a DISTINCTCOUNT measure that lists how many "Occupations" from my dim table (5 occupations total) are represented in each salary range.
Over on the left are the five occupation options available.
I was challenging myself to create a new measure that would, in a column, basically concatenate once each occupation represented in my distinct count of occupation column. So, for example, in my $160,000 salary bracket that has 2 occupations represented, if those two occupations were "Management" and "Professional", in the next column I wanted "Management, Professional" to appear.
Everything I tried would return every occupation per customer, leading to thousands of occupations strung one after another.
Other stuff I tried just broke the table and couldn't be displayed, or created other odd things.
I tried various combinations of CONCATINATE, CONCATINATEX and DISTINCTCOUNT, but with no luck.
Is this something do-able?
Thanks everybody. The forums have become a great tool for me.
Solved! Go to Solution.
Hi @Anonymous
Try this following measure below, which should give you the desired result
Occupations Represented = CONTATENATEX(VALUES('Tablename'[Occupation]), 'TableName'[Occupation],",")
Hi @Anonymous
Try this following measure below, which should give you the desired result
Occupations Represented = CONTATENATEX(VALUES('Tablename'[Occupation]), 'TableName'[Occupation],",")
Awesome! That did it. Thanks a ton guavaq. I'm in awe of your DAX mastery! 🙂
Happy to help out @Anonymous
And we all hard to start at some point, I have no doubt you will gain knowlege the more you work with DAX.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |