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.
Hi all. I have a table like this :
What i want is to create a new column in DAX that displayes an array if distinct colours for each ID. So what i want is not collapse the dataframe by grouping by the IDs, but instead one new column like the image below.
Thank you all!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
ID / Column =
CONCATENATEX (
DISTINCT ( colours[ ID] ),
colours[ ID] & ":"
& CONCATENATEX (
SUMMARIZE (
FILTER ( colours, colours[ ID] = EARLIER ( colours[ ID] ) ),
colours[Colour]
),
colours[Colour],
", "
),
UNICHAR ( 10 )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Jihwan_Kim Thank you very much, that's what i wanted! I know I'm asking for too much but what changes should I make to this function if i would like it as a measure instead (I want it to change dynamically upon filtering the table, that's why i would like it also as a measure instead of column in this case).
Hi,
Thank you for your message.
I don't know how your datamodel looks like, or how your expected outcome of the visualization looks like.
Please share your sample pbix file's link with how the expected outcome of the visualization looks like.
Thanks.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
@Jihwan_Kim Thanks for the response. Below is a link with the pbix file. I cannot upload it directly because I am a new member.
https://www.dropbox.com/s/jx9kklf0egq4v4g/colours.pbix?dl=0
So as you can see above, I have a dynamic title on the top left which changes based on the filter measure based on the slicer. I have managed to create an array of all colours which is not what i want. What i want is on the image below(bassically display the selected ids, with their respective colours like below. Thank you!
Hi,
Please check the below picture and the attached pbix file.
ID / Column =
CONCATENATEX (
DISTINCT ( colours[ ID] ),
colours[ ID] & ":"
& CONCATENATEX (
SUMMARIZE (
FILTER ( colours, colours[ ID] = EARLIER ( colours[ ID] ) ),
colours[Colour]
),
colours[Colour],
", "
),
UNICHAR ( 10 )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Amazing, thank you!
Hi,
Please check the below picture and the attached pbix file.
Colour Array CC =
CONCATENATEX (
SUMMARIZE (
FILTER ( 'Table', 'Table'[ID] = EARLIER ( 'Table'[ID] ) ),
'Table'[Colour]
),
'Table'[Colour],
", ",
'Table'[Colour]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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 |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |