Yes, you can change the blank values in your Power BI report to "not valid" using calculated columns or measures. Here's suggested steps by chatGPT:
- Open your Power BI report and go to the data view.
- Locate the fact table that contains the "domain" field and the domain-list dimension table.
- Create a relationship between the fact table's "domain" field and the corresponding field in the domain-list dimension table.
- In the fact table, right-click on the "domain" field and select "Manage Roles" from the context menu. This will open the Roles Manager dialogue.
- In the Roles Manager dialogue, click on the "Create" button to create a new role.
- In the new role, specify a name (e.g., "Not Valid") and click on the "OK" button.
- With the "Not Valid" role selected, go to the "Table" menu and select "New Column" to create a new calculated column.
- In the formula bar, enter the following formula to replace blank values with "not valid":
NewColumn = IF(ISBLANK('FactTable'[Domain]), "not valid", 'FactTable'[Domain])
- Press Enter to apply the formula. This will create a new calculated column in the fact table, replacing blank values with "not valid".
- Return to the "Manage Roles" dialogue and assign the "Not Valid" role to yourself or any other users who should see the modified values.
Now, when you view your Power BI report with the "Not Valid" role, any blank values in the "domain" field will be replaced with "not valid". Users without this role will continue to see the original blank values.
Note that using calculated columns will store the modified values in the fact table, which can impact storage and processing. If you prefer a dynamic approach without modifying the data, you can use measures instead of calculated columns. In this case, you would create a measure with the same logic to display "not valid" when the domain is blank.