Forum Discussion
Dynamic Table in Power BI
- Anonymous4 years ago
Hi lfholland,
I think you need to create a parameter that stored the rule to remark records, then you can add a calculated column to your fact table and lookup at the above parameter table rules, and compare with the current row value to setting corresponding groups.
SWITCH function (DAX) - DAX | Microsoft Docs
From SQL to DAX: String Comparison - SQLBI
Regards,
Xiaoxin Sheng
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_CODE | Header_1 | Header_2 | Header_4 | Header_5 |
| 1002330 | ASSETS: | Cash | Total Assets | Balance Sheet |
| 1002400 | ASSETS: | Cash | Total Assets | Balance Sheet |
| 1002401 | ASSETS: | Cash | Total Assets | Balance Sheet |
| 1002402 | ASSETS: | Cash | Total Assets | Balance Sheet |
| 1002403 | ASSETS: | Cash | Total Assets | Balance Sheet |
| 1002404 | ASSETS: | Cash | Total Assets | Balance Sheet |
| 1300 | ASSETS: | Total AR | Total Assets | Balance Sheet |
| 1300100 | ASSETS: | Total AR | Total Assets | Balance Sheet |
| 1326 | ASSETS: | Total AR | Total Assets | Balance Sheet |
Hi lfholland,
I think you need to create a parameter that stored the rule to remark records, then you can add a calculated column to your fact table and lookup at the above parameter table rules, and compare with the current row value to setting corresponding groups.
SWITCH function (DAX) - DAX | Microsoft Docs
From SQL to DAX: String Comparison - SQLBI
Regards,
Xiaoxin Sheng
- lfholland4 years agoAdvocate I
I think this will work. I'll test it out and let you know. Thank you!!!