Forum Discussion
Problem with bulk write-back
Hi,
I've created a write-back function which initiates the bulk write-back. In order to initiate the bulk write-back, the function excepts a list of ID's delimited by ", " (comma and a space).
Now, in Power BI, when I write a DAX measure to create list of ID's using CONCATENATEX() function referencing a column from the dimension table, the button gets activated to initiate a write-back BUT the problem is, it creates a list of all the ID's on which write-back is not required to be initiated. So, then I filter out those ID's based on the reference either from a mesaure or from the fact table, so that write-back is initiated only and only onto the required ID's. And when this happens i.e., any association is created with the fact table, the write-back button simply goes blank.
I don't know whether this is a BUG or not. Because when a simple VALUES() function is used inside a CONCATENATEX() simply referencing a column from a dimension table, the button gets activated BUT as soon as any reference is made with the fact table in order to filter out the un-required ID's the button simply goes blank/in-activates.
Thanks,
4 Replies
- Ahmed-ElfeelSuper User
Hi Erg_Harsh,
So When you filter your CONCATENATEX measure to reference a fact table it creates a more complex evaluation context....Its a common hurdle when trying to pass filtered context-aware lists for bulk write-back operations
So How to Solve it?
First Approach:Refine Your CONCATENATEX Measure with a Filtered Table
- This method builds a clean table of IDs first before concatenating them. Create a measure like this:
Filtered ID List = VAR FilteredIDs = CALCULATETABLE( VALUES('FactTable'[ID]), // Gets IDs from fact table ALLSELECTED('DimensionTable') // Respects current visual/page filters ) RETURN CONCATENATEX(FilteredIDs, [ID], ", ")- which creates an explicit table of IDs based on the intersection of your fact table and the current filter context
Second Approach:Use a Multi-Select Slicer (Simpler)
- The article specifically shows that mapping a multi-select list or button slicer to the write-back function is often a more reliable approach
Resources:
- Bulk Write-Back w. Translytical Task Flows in Microsoft Fabric / Power BI: Writing a single value back to multiple records at the same time
- CONCATENATEX Empty Records (Fabric Community)
- Filtering fact tables using inactive dimension tables (Fabric Community)
if this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.- Erg_HarshNew Member
Hello Ahmed-Elfeel,
Thank You for sharing the response!
The thing is, I've tried all the approaches, using CALCULATE(), CALCULATETABLE(), FILTER(), SUMMARIZE(), VALUES(), DISTINCT(), INTERSECT(), EXCEPT(), NATURALLEFTOUTERJOIN(), etc.
The thing is, as long as a column from a dimension table is referenced the write-button stays activated BUT as soon as any reference is created with the column from a fact table, the button goes in a in-activation mode.
Moreover, I used that same reference link which you shared -
I think this is simply a BUG or a limitation currently, which write-back button cannot handle when any reference is created with the fact table.
Thanks,
- amitchandakSuper User
Erg_Harsh , I am assuming in this case you are trying to use a measure, not a column from a table, because concatenation will happen inthe measure correctly