Reply
snair2283
New Member

Create a table out of measure which is dynamic

Hi

I have a table A which has some segments. I have a slicer visual added to the report where I select some of the segments.

I want to create a separate table B which has just the segments that were selected in the slicer. This table would be dynamic.

I created a measure in the table A that combines all the segments selected and concatenates them with a comma in between.

I want to create the table B which 

1. First takes the measure I created 

2. And then transpose them so that each segment is a row by itself.

 

Please advise

 

1 ACCEPTED SOLUTION
DataNinja777
Super User
Super User

Hi @snair2283 ,

As @Greg_Deckler mentioned, a calculated table in the data model cannot dynamically respond to slicer selections. However, you can simulate the visual effect of the ConcatenateX result displaying in rows instead of horizontally concatenated text by using a measure like the one shown below:

SelectedSegments with line break = CONCATENATEX(VALUES(TableA[Segment]), TableA[Segment], UNICHAR(10))

The resulting output is shown below. Please note that when exporting this to a csv file, it will be displayed in a single cell rather than split into four separate rows, which may not meet your requirements.

DataNinja777_0-1725031285362.png

I have attached an example pbix file for your reference.

 

 

View solution in original post

2 REPLIES 2
DataNinja777
Super User
Super User

Hi @snair2283 ,

As @Greg_Deckler mentioned, a calculated table in the data model cannot dynamically respond to slicer selections. However, you can simulate the visual effect of the ConcatenateX result displaying in rows instead of horizontally concatenated text by using a measure like the one shown below:

SelectedSegments with line break = CONCATENATEX(VALUES(TableA[Segment]), TableA[Segment], UNICHAR(10))

The resulting output is shown below. Please note that when exporting this to a csv file, it will be displayed in a single cell rather than split into four separate rows, which may not meet your requirements.

DataNinja777_0-1725031285362.png

I have attached an example pbix file for your reference.

 

 

Greg_Deckler
Super User
Super User

@snair2283 That's not really possible if I understand what you are trying to do. The only way to sort of do it is to use TOCSV. DAX tables are calculated at the time of refresh and thus are not dynamic.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)