Dimension ID Mapping - View hidden columns

Started by MarionB · 3 days, 11 hours ago · 3 replies · 55 views
MarionB Participant
3 days, 11 hours ago

I am working on setting up the Dimension ID Mapping for Writeback of Planning data into SQL but for the mapping I need access to the dimension keys. Now those key columns are usually hidden in a Semantic Model as they are of no value to the viewer or casual report builder and are only relevant for model development. Is there a way to toggle a "show hidden" like you can do in Power BI to be able and select the hidden columns for the Dimension ID mapping?

3 Replies
3 days, 10 hours ago

I have a few additional questions regarding Writeback with Dimension ID mapping.

 

I followed the documentation (https://learn.microsoft.com/en-us/fabric/iq/plan/resources/best-practices/how-to-create-dimension-id-mapping). I really like that there is now an option to automatically include the writeback table into the Semantic Model, but I have issues setting up the relationships: I have two label columns on rows (account group and account) and I set up Dimension ID mapping to map account to account_id. Now account is a string column (as it is a label), account_id is an integer column. The id column created in the SQL database is of datatype string, so the account with account_id 6100 got saved as the string "6100.0" in the SQL database. The type mismatch causes an error when trying to set up the relationship. Why does Dimension ID mapping not recognize the data type of the ID column? It is set to "whole number" in the Semantic Model, I expect the column in the SQL database to be of the same type

 

When I set up a Dimension ID mapping I don't need any related columns of that table to be written into the database. I already have the ID, I don't need account group or any other higher level. But I am only able to exclude "account" as it is the only item that has an explicit mapping but as it is the leaf level, all higher levels are irrelevant for writeback and only waste space. I want to at least be able to turn this off if it is not off by default as soon as there is a mapping. I thought maybe the "In key" toggle does this but if I turn it off, I no longer see data (from the semantic model) on this level, I still want to see aggregated data in the Planning Sheet, I just don't want to see the column in the Writeback table.

 

As well as too many columns I also have too many rows to my liking. I only activated one measure (my writeable number measure that I created in the Planning sheet) and I have lots of NULL for the Value column. I only need rows where the Value column has anything else than NULL - or at least has a LastUpdatedAt date if the Value has been deleted at some point to reflect the current change without deleting the whole row.

When I add a writeback table to my semantic model, what I expect is a fact table: dimension ids, values, maybe some metadata. No extra rows for aggregated levels, no extra rows for item combinations without a value. I don't know if it is my lack of skills that hinders me from getting exactly that or if the Writeback in Fabric Planning isn't set up to do this.

 

RavishangarLumel Staff
3 days, 5 hours ago

@marionb

Hello

Thanks for your query. we are internally checking on this and will get back. We have replicated your scenario and will check on the next steps and let you know.

Technical Architect · Lumel Technologies · 18 hours, 33 minutes ago

Hi Marion,

 The id column created in the SQL database is of datatype string, so the account with account_id 6100 got saved as the string "6100.0" in the SQL database. The type mismatch causes an error when trying to set up the relationship. Why does Dimension ID mapping not recognize the data type of the ID column?

we've identified this issue and we've fixed it, you can expect it to be available in roughly 3 weeks depending on your region.

Until then, a workaround is a SQL view on the writeback table that casts the ID to an integer, for example CAST(CAST(account_id AS float) AS int), and relating that view to your dimension table.

 When I set up a Dimension ID mapping I don't need any related columns of that table to be written into the database. I already have the ID, I don't need account group or any other higher level. [...] I thought maybe the "In key" toggle does this but if I turn it off, I no longer see data (from the semantic model) on this level.

This takes two steps.

Step 1: Use only the lowest level's ID

- Turn In key OFF for the parent levels only (account group). Leave it on for the lowest level (account).
- For account, set Key strategy = ID Column and Id field = account_id.
- The ID is then built from account_id alone, so it must be unique per account, like a primary key.
- Turning In key off for the parent levels does not hide their data. Aggregated values still show in the Planning Sheet; that level is just left out of the ID your inserted columns are stored again.

Step 2: Exclude the parent-level columns from writeback

Writeback Settings > Data > Exclude Dimensions for Writeback > tick the parent levels. You can also tick the account label column if you only want the ID.

 I have lots of NULL for the Value column. I only need rows where the Value column has anything else than NULL - or at least has a LastUpdatedAt date if the Value has been deleted at some point.

Writeback Settings > General > Filter Type = Custom Filters > your measure is not empty

 When I add a writeback table to my semantic model, what I expect is a fact table: dimension ids, values, maybe some metadata. No extra rows for aggregated levels, no extra rows for item combinations without a value.

Set Writeback Type = Wide

Combined with the steps above, you get the table in

an ID column, value columns, and metadata (user, timestamp). No parent-level columns, no subtotal rows, no empty rows.

Let me know if this works for you.

Viewing 3 replies - 1 through 3 (of 3 total)

Microsoft, Azure, Copilot, Excel, Fabric IQ, Microsoft Entra, Microsoft Fabric, Microsoft Teams, OneLake, Outlook, Power Automate, Power BI and SharePoint are trademarks of the Microsoft group of companies. IBCS is a registered trademark of IBCS Association. All other trademarks are the property of their respective owners.

This community is operated independently by Lumel. Nothing on this site constitutes a representation or warranty by Microsoft.