Forum Discussion

lfholland's avatar
lfholland
Advocate I
4 years ago
Solved

Dynamic Table in Power BI

I need to create a dynamic table upon load.  For example, I am developing our finance dashboard where all account codes that start with 100 are part of the "ASSETS" group.  So, when the data is refreshed, if there is a new account code added that begins with 100, in a column labeled "Header 1" it is labeled ASSETS.  There are thousands of account codes and more get added on a regular basis, so maintaining in excel wouldn't be very efficient.  I have other headers as well, and as it gets loaded, it would end up looking something like the image below.

We currently do this in QlikView by associating a group of account codes to a specific variable and then build a table based off those variables.  I am basically re-designing it in Power BI and I'm still learning!

Does anyone have any resources or know of videos I can watch to learn how to accomplish this?

Bottom line, the account code is loaded from our data warehouse but the headers need to be assigned dynamically as they are not available fields where our financial data is held.

Thank you in advance!

 

 

5 Replies

    • lfholland's avatar
      lfholland
      Advocate I

      The screen shot I posted is my expected outcome; however, I can provide a little more variety as to what I need.  Below is a sample of what I need.


      I'm wondering as another solution if there is a type of "wildmatch" that can be used in an if statement?  For example if the first character of the account code is 1 or 2, Header_1 is "ASSESTS".  If the account code begins with 100, Header_2 is "cash", etc.

      ACCOUNT_CODEHeader_1Header_2Header_4Header_5
      1002330ASSETS:CashTotal AssetsBalance Sheet
      1002400ASSETS:CashTotal AssetsBalance Sheet
      1002401ASSETS:CashTotal AssetsBalance Sheet
      1002402ASSETS:CashTotal AssetsBalance Sheet
      1002403ASSETS:CashTotal AssetsBalance Sheet
      1002404ASSETS:CashTotal AssetsBalance Sheet
      1300ASSETS:Total ARTotal AssetsBalance Sheet
      1300100ASSETS:Total ARTotal AssetsBalance Sheet
      1326ASSETS:Total ARTotal AssetsBalance Sheet
      • lbendlin's avatar
        lbendlin
        Super User

        Please provide sanitized sample data that fully covers your issue.