Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
MP_123
Microsoft Employee
Microsoft Employee

dax to get a list of values

hi

i saw here a dynamic measure to show the value selected in the slicer

ifhasonevalue -> values()

 

is there any way to show more than one values? i mean, if i selected to items on slicer, to show both of them in dynamic measure

 

thanks! 

2 ACCEPTED SOLUTIONS
sdjensen
Solution Sage
Solution Sage

Do you mean something like this? I know that some of my screenshot is in danish but I know you can understand anyway.

Here is some translations

År til dato (i går) = Year to date (yesterday)

Sidste år til dato (i går) = Previous year to date (yesterday)

Måned til dato (i går) = Month to date (yesterday)

Måned til dato (sidste år i går) = Month to date (previous year yesterday)

I går = Yesterday

I går (sidste år) = Yesterday (previous year)

 

DynamicDates.png

/sdjensen

View solution in original post

KHorseman
Community Champion
Community Champion

@MP_123 if you're referring to the fact that CONCATENATE only takes two arguments to concatenate, that does not apply here. CONCATENATEX is not the same as CONCATENATE. This measure will concatenate a list of any arbitrary number of selected items in a slicer. Try it on your dataset.

 

Concatenatex.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
KHorseman
Community Champion
Community Champion

Selected Stuff = CONCATENATEX( VALUES( TableName[ColumnUsedInSlicer]), TableName[ColumnUsedInSlicer], ", ")





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




MP_123
Microsoft Employee
Microsoft Employee

@KHorseman it's good but i think more than two (i don't know in advanced how many)

KHorseman
Community Champion
Community Champion

@MP_123 if you're referring to the fact that CONCATENATE only takes two arguments to concatenate, that does not apply here. CONCATENATEX is not the same as CONCATENATE. This measure will concatenate a list of any arbitrary number of selected items in a slicer. Try it on your dataset.

 

Concatenatex.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




thanks for your post, however, I'm having wired issue, the CONCATENATEX function is greyed out in Power BI desktop, any idea?

BI Analyst and Developer @ Queen Mary University of London, UK.
MP_123
Microsoft Employee
Microsoft Employee

@KHorsemanyou're right

thanks!

MP_123
Microsoft Employee
Microsoft Employee

@KHorseman

hi again,

do you have an idea how to sort  the concatenatex alphabeticaly maybe with another dax function?

the order is incosistent.

 

thanks!

KHorseman
Community Champion
Community Champion

@MP_123 I don't think so. DAX functions that return tables or columns never guarantee their sort order as far as I can tell. The only way to get CONCATENATEX to concatenate in alphabetic order would be to pre-sort the column you're feeding into the first argument, where I used VALUES. I suppose if you could come up with a way to use RANKX to rank the words in alphabetic order you might be able to make it work, but I can't think of a way to do that either.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




sdjensen
Solution Sage
Solution Sage

Do you mean something like this? I know that some of my screenshot is in danish but I know you can understand anyway.

Here is some translations

År til dato (i går) = Year to date (yesterday)

Sidste år til dato (i går) = Previous year to date (yesterday)

Måned til dato (i går) = Month to date (yesterday)

Måned til dato (sidste år i går) = Month to date (previous year yesterday)

I går = Yesterday

I går (sidste år) = Yesterday (previous year)

 

DynamicDates.png

/sdjensen

You can read about how to create a similar dimension here

/sdjensen

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.