Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
We are trying to use the new power Translytical apps to connect to a fabric database for update/insert/delete functionality. It all works however you must give every text slicer a value before the UDF button will be active and be able to be used.
Ideally these could be optional or have a space as default and the UDF can do a trim?
You can see the insert and update UDF are configured with all 3 text slicer fields.
.
Hi @seanbuckley
Thanks for reaching out to the Microsoft fabric community forum.
@burakkaragoz
Thanks for your prompt response
@seanbuckley
In the context of Power BI's Power Translytical apps (Fabric Real-Time Intelligence apps that allow CRUD operations), the issue you're seeing is related to how text slicers are treated as mandatory input fields before enabling the Update/Delete Function (UDF) button.
Here's how to approach making text slicer input optional or provide default behavior to allow the button to activate:
Options to Make Text Slicer Input Optional
1. Use Default Blank or Space Value in the Slicer
If the slicer is required for the UDF to activate, but you don't want to force the user to input a value:
Add a default value like "<None>" or " " (a single space) to your data source.
Modify the slicer’s dataset to include this default option.
In your UDF logic (stored procedure or Power Query), use TRIM() to handle this.
IF LTRIM(RTRIM(@UserInput)) = ''
SET @UserInput = NULL
2. Modify UDF Logic to Accept NULL or Empty Values
Update your UDF (Update/Delete Function) to treat NULL or empty strings as valid and handle them internally.
UPDATE MyTable
SET Col1 = COALESCE(NULLIF(@Input1, ''), Col1),
Col2 = COALESCE(NULLIF(@Input2, ''), Col2)
WHERE ID = @ID
This allows users to leave the field blank, and the existing value stays unchanged.
3. Use Custom Input Forms (Not Slicers)
If slicers are too restrictive, build a custom form with text input boxes (e.g., via Power Apps or Power BI’s new form visual when available) and bind the UDF to those inputs. These forms can allow optional inputs more flexibly than slicers.
4. Set Default Parameters or Bind to DAX Expressions
Use DAX measures or calculated columns that default to a blank string if the slicer has no selection:
SelectedInput =
IF(
ISFILTERED(MyTable[MyField]),
SELECTEDVALUE(MyTable[MyField]),
""
)
Then feed this value to the UDF logic or visual-level filter that drives the update.
Create a text slicer (preview) - Power BI | Microsoft Learn
Customize buttons in Power BI reports - Power BI | Microsoft Learn
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana.
Hi v-lgarikapt, thanks for replying here is my answers to your helpful points;
1. I don't see how to add a data source to a text slicer, have you done this please share, if we can then I can get the trim component working I am sure
2. Yes my UDF works in fabric and so the issue is only that the button won't activate in powerbi without a value
3. I am trying to build without an app
4. This option got my half way, in that I can get the button to become active using a calculated field and some DAX, like this example
Any other ideas please share.
Hi @seanbuckley ,
Clarifying the Problem
You're using Power BI's new Translytical features to trigger Update/Delete Functions (UDFs) against a Fabric database.
You're using Text Slicers for user input.
But unless all text slicers have values, the UDF button stays disabled.
You want to:
Allow users to skip fields (keep current value).
Still allow the UDF to fire.
Preferably avoid Power Apps.
Workaround Strategy
1. Simulate Optional Input via Calculated Table + Text Slicer Binding
Since you can’t bind text slicers directly to parameters, here's how to link a text slicer input to a parameter that gets passed to the UDF:
Steps:
Create a Calculated Table to back your text slicer input:
PracticenameOptions =
UNION(
DISTINCT(practice_master_test[practice_name]),
ROW("practice_name", "<Blank>")
)
Add a slicer using PracticenameOptions[practice_name].
Use a calculated column (or measure) to extract the slicer input:
PracticenameInput =
VAR sel = SELECTEDVALUE(PracticenameOptions[practice_name])
RETURN IF(sel = "<Blank>", "", sel)
Map PracticenameInput to your UDF parameter.
In your SQL (inside Fabric UDF), add logic to ignore blank inputs:
UPDATE practice_master_test
SET practice_name = COALESCE(NULLIF(@PracticenameInput, ''), practice_name)
WHERE id = @SomeID
Result:
If user leaves the slicer on <Blank>, it sends "", and your SQL skips updating.
If user selects a value, it gets passed.
Use a Parameter Table to Drive Inputs
This technique creates a one-row parameter table users can update through slicers or visuals.
Create a table like:
ParameterInput =
ADDCOLUMNS(
GENERATESERIES(1,1,1),
"PracticeName", BLANK()
)
Use SELECTEDVALUE(ParameterInput[PracticeName]) to bind to the UDF input.
This is more involved but gives you the ability to simulate user form inputs without a Power App.
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana.
Hi LakshmiNarayana,
thanks for your continued effort on this, I have implemented your solution and whilst it does work if users want to select from a predefined list or leave blank allbeit with a different user experience, but it doesn't allow users to be able to insert new values, that we were doing in the text slicer. I am open/happy for another method but don't have one to date that works.
Seems that if I want to allow the text slicer it has to have a value, and annoyingly even if I try and publish with a space in it, it doesn't appear that way when viewed.
Any other ideas
thanks again, Sean
Hi @seanbuckley ,
Thanks for the detailed follow-up ,I really appreciate your thoughtful testing and clear summary of the current behavior.
Alternative Approach
Since the Text Slicer has these restrictions, one alternative worth considering is the Power Automate for Power BI visual — which can collect free-text input and pass it to your UDF or a Fabric pipeline without requiring Power Apps.
How it Works:
Add the Power Automate visual to your report.
Configure a flow to:
Prompt the user for input when the button is clicked (supports blank or new values).
Pass the input to a Fabric UDF (via HTTP call, Data Factory pipeline, or Direct Lake update).
Inside your UDF logic, handle blank values using something like COALESCE() to preserve the existing data when no new input is provided.
This gives you a flexible, user-driven input experience while keeping everything within the Power BI and Fabric ecosystem (no external app required).
Text slicer (preview) considerations and limitations - Power BI | Microsoft Learn
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana.
Hi LakshmiNarayana,
I have limited experience in these tools, from google and chatgpt I was unable to set up a flow to call a fabric UDF, note there will be several attributes to setup, does that mean several parameters, and those parameter accept user text rather than a list etc. Any further advice or links to articles would be great
thanks again
Sean
Hi @seanbuckley
Thank you for the response.
Below are some related learning links
that may help you.
Solved: Calling HTTP Requests Using User Defined Functions... - Microsoft Fabric Community
Overview - Fabric User data functions (preview) - Microsoft Fabric | Microsoft Learn
User data functions activity in data pipelines - Microsoft Fabric | Microsoft Learn
Quickstart - Create a Fabric User data functions item (Preview) - Microsoft Fabric | Microsoft Learn
If this post helped resolve your issue, please consider giving it Kudos and marking it as the Accepted Solution. This not only acknowledges the support provided but also helps other community members find relevant solutions more easily.
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
LakshmiNarayana
Hi @seanbuckley ,
If your issue has been resolved, please consider marking the most helpful reply as the accepted solution. This helps other community members who may encounter the same issue to find answers more efficiently.
If you're still facing challenges, feel free to let us know we’ll be glad to assist you further.
Looking forward to your response.
Best regards,
LakshmiNarayana.
Hi @seanbuckley ,
If your question has been answered, kindly mark the appropriate response as the Accepted Solution. This small step goes a long way in helping others with similar issues.
We appreciate your collaboration and support!
Best regards,
LakshmiNarayana
Hi Lakshmi, I haven't had more time to investigate it sounds like a complicated multi step solution which we were trying to avoid, will wait and see what drops with this months release. thanks for following up, but unsolved at present.
Hi @seanbuckley ,
Thanks for the update. I understand sometimes these things can take time. Let me know if you want to look at it again later.
Also, kindly keep the updates here when you get a chance it will be helpful for other members to find and follow easily.
Best Regards,
LakshmiNarayana
Hi @seanbuckley ,
Yeah, this is a common limitation with Translytical apps when using text slicers as input fields. By default, the UDF buttons (like Update/Delete) only activate when all required inputs are non-empty, which can be restrictive.
Here’s what you can try:
WHERE (@PracticeCode IS NULL OR PracticeCode = @PracticeCode)
SET @PracticeCode = TRIM(@PracticeCode)
Would be great if future updates let us configure which fields are required for UDF activation.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
Hi Burakaragoz,
thanks for replying,
point 1 yes (I should of clarified) I can get the UDF in Fabric working without values in test mode using this code, here is an working example with 6 values, there can be 40 attributes on some table and putting a space into each is undesirable.
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |