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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
eneasgesing
New Member

Change column in visual based on measure value

I have in my report a table called Departments, with the following structure:

 

DepartmentNameL1L2L3L4
DP/MNG1DPMNG1nullnull
DP/MNG1/SUB1DPMNG1SUB1null
DP/MNG1/SUB2DPMNG1SUB2null

 

In the report there a Data Segmentation visual, with L1, L2, L3 and L4. Additionally, I have a measure thats successful calculate the SegmentationLevel (if is a L2 department, it return 2).

 

In same report I have a Table visual like this, that works:

 

DepartmentNameValue
DP/MNG1/SUB120
DP/MNG1/SUB210
... 

 

But I don't want to display full department, because my company have really big org and there is no reason to unfold so much when a higher org is selected. I need to choose the column based on SegmentationLevel measure. Example: If I segment by L1 = DP and L2 = MNG1, the SegmentationLevel measure will be 2 and I would like Column L3 instead of DepartmentName on Table Visual.

 

I have tried to calculate, but can't get column based on measure value. Any idea on how to achieve this?

2 REPLIES 2
vanessafvg
Super User
Super User

can you share what you have done and can you please provide an example of the expected output of the value in the table





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thank you for your support.

 

I generated an example file where I show data and explain what I'm trying to do:

Sample Report.pbix 

 

Hope you can help me with it.

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors