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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
demian-cr
New Member

Return an entire column in a Data segment

Hello everyone.

I would like to set a Data segment where, depending of the Filter of another one, an specific column of my database appears.

 

Example: 

If in Data segment 1, I select the choice one, then the Data segment 2 have to show the column "1".

If in Data segment 1, I select the choice two, then the Data segment 2 have to show the column "2".

Etc.

 

How can I do this?

 

Thanks a lot for your help.

 

Regards.

1 ACCEPTED SOLUTION

Hi  @demian-cr ,

 

I made a simple table as below:

vkellymsft_0-1627466690130.png

First create an index column in query editor;

Then suppose col1 is the defaulting showing column,create a measure as below:

Measure = 
IF(NOT(ISFILTERED('Table (2)'[Column1])),MAX('Table'[Col 1]),SWITCH(SELECTEDVALUE('Table (2)'[Column1]),
"Col 1",MAX('Table'[Col 1]),"Col 2",MAX('Table'[Col 2])))

And you will see:

vkellymsft_1-1627466982965.pngvkellymsft_2-1627466990120.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

View solution in original post

4 REPLIES 4
v-kelly-msft
Community Support
Community Support

Hi @demian-cr ,

 

Could you pls provide some sample data with expected output to make your requirement clear?

 

Best Regards,
Kelly

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

Hello @v-kelly-msft 

Thanks a lot for your help.

 

For example:

I have a dropdown list, and near to it, I have a table that only shows an specific field of the table.

Then, if I change the choice selected in the dropdown, I would like that the data segment where the table is, shows another field.

I mean, each time the choice of the dropdown change, the field showed in the table has to change too.

 

Do I explain myself?

 

Regards.

Hi  @demian-cr ,

 

I made a simple table as below:

vkellymsft_0-1627466690130.png

First create an index column in query editor;

Then suppose col1 is the defaulting showing column,create a measure as below:

Measure = 
IF(NOT(ISFILTERED('Table (2)'[Column1])),MAX('Table'[Col 1]),SWITCH(SELECTEDVALUE('Table (2)'[Column1]),
"Col 1",MAX('Table'[Col 1]),"Col 2",MAX('Table'[Col 2])))

And you will see:

vkellymsft_1-1627466982965.pngvkellymsft_2-1627466990120.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

Hi  @demian-cr ,

 

I made a simple table as below:

vkellymsft_0-1627466690130.png

First create an index column in query editor;

Then suppose col1 is the defaulting showing column,create a measure as below:

Measure = 
IF(NOT(ISFILTERED('Table (2)'[Column1])),MAX('Table'[Col 1]),SWITCH(SELECTEDVALUE('Table (2)'[Column1]),
"Col 1",MAX('Table'[Col 1]),"Col 2",MAX('Table'[Col 2])))

And you will see:

vkellymsft_1-1627466982965.pngvkellymsft_2-1627466990120.png

For the related .pbix file,pls see attached.

 

Best Regards,
Kelly

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

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.