Forum Discussion

robtaylor's avatar
robtaylor
Frequent Visitor
6 years ago

Pattern for supporting customisable fields

Hi,

 

I work for a company which produces an app for an existing product which is in the azure marketplace. The product contains a "Account" table which allows custom fields to be created by our customers. For example, I might want to add a field for "Priority" to show how important the account is. Each one of our customers has their own database, and can configure whichever custom fields they like.

 

We have a feature request to support the custom fields inside out Power BI App - i.e. being able to filter data in the report by these fields which could be different across customers. I can immediately see problems with building an app on a dataset with changing field names underneath and it not working properly. My question is, has anyone done this - or has a pattern/suggestion for how to tackle it. I have no issues storing/surfacing the data in any format required, this is purely related to getting it working in PowerBI.

 

The approach that jumps out is to add an "AccountExtensions" table to the model, which looks something like this;

 

CustomerIDCustomField1CustomField2CustomField3
1xxxxxxxxx
2xxxxxxxxx

 

And then use those fields as filters in the reports - I am wondering if there is a more established pattern for doing this which I don't know about?

 

Happy to answer clarifying questions 🙂

 

thanks,

 

Rob

2 Replies