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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Dynamic Field Change

Hi All,

 

I am very new to Power BI. Please help and support me.

 

Code.PNG

 

Based on Above selection, the field in the below Metrics Table should change from Account Code to Account Name.

Main.PNG

 

Thanks in Advance 🙂

 

 

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 
Try the following steps, it might change the model, so you can test on a sample or duplicated table first.

1. Hold on Shift to selected both Code and Name columns,

2. Unpivot columns, Close and apply.

3. Use the Attribute table as the Slicer

4. In the matrix, put Attribute in the Columns field, pat value in the Values field.


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@Anonymous 
Try the following steps, it might change the model, so you can test on a sample or duplicated table first.

1. Hold on Shift to selected both Code and Name columns,

2. Unpivot columns, Close and apply.

3. Use the Attribute table as the Slicer

4. In the matrix, put Attribute in the Columns field, pat value in the Values field.


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

 

amitchandak
Super User
Super User

@Anonymous , Refer this link

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi AmitChandak,

 

Thanks for you help.

 

But it works fine for Measure. But how to use is for Columns. I used the same formula but not working.

 

MainAccount = IF(HASONEFILTER(CodeTest[CodeName]),SWITCH(SELECTEDVALUE(CodeTest[CodeName]),"Code",Accounts[AcctCode],"Name",Accounts[AcctName]),BLANK())
 
If I select Code     Code.PNG   below result should come.
AcctCode.PNG
If I select Name    Name.PNG  below result should come.
 
MainNAme.PNG
 
Hope you understand my question.
 
Thanks

@Anonymous , refer Dynamically change chart axis in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M

 

Or Try bookmarks

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors