The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
Our application is a multi tenancy web app and we are using Custom fields for User table based on the client. Each client can have upto 8 custom fields in which they can define the name for that custom fields. So in In reports (table or matrix) we would like to display the custom field value in header. Please find our use case below. Columns which are marked in Blue color are static columns.
Please help us to resolve this issue.
Thanks in advance
Madhan
Hi @lwgpowerbiadmin ,
This can be done in Power Query. You need to maintain a table that contains the columns to be renamed and the new names. These columns in a table will be converted to a list of lists which will be used in the Table.Renames argument in the other table instead of hardcoding the new names. Instead of something like this:
= Table.RenameColumns(#"Changed Type",{{"Custom1", "Male"}, {"Custom2", "Email"}, {"Custom3", "Country"}})
you do this:
= Table.RenameColumns(#"Changed Type", Names)
Here's the link to the sample pbix. Go to the query editor to see the M script. https://drive.google.com/file/d/1iH9LHZkX4OVpfW788_81dGwCEiiMMo1G/view?usp=sharing
Proud to be a Super User!
Hi @danextian
Thnaks a lot for your solutions. This helps us to move further. But we are facing issue while changing the Names list value. Please see below scenario
Names list:
Initially we have mapped names like below
Custom1: Gender
Custom2: Email
Custom3: Country
with this list we have creted Table Visual and it is working perfect.
Now to simulate the same report for another Client, We have changed the List value (Email to EmailAddress)
Custom1: Gender
Custom2: EmailAddress
Custom3: Country
When we close and apply, we are getting below error in Table visual.
Basically we are using Embedded Report in our report for all our clients. based on the client Names list will change. Please guide us on this.
hI @lwgpowerbiadmin,
I couldn't replicate your error when trying to change the column name manually but did so after modifying the column names mapping which in turn automatically renamed the Email column to EmailAddress.
It seems that "automatically" renaming a column can cause an error in the visual that uses the original column name. The simplest solution is to remove that erring column/field and replace it with what it's been renamed to.
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
79 | |
77 | |
46 | |
39 |
User | Count |
---|---|
143 | |
113 | |
64 | |
63 | |
53 |