Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
seanbuckley
Regular Visitor

Translytical apps - how to make the text slicer input optional and have the update button active

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?

seanbuckley_0-1748587744310.png

You can see the insert and update UDF are configured with all 3 text slicer fields.

.

14 REPLIES 14
v-lgarikapat
Community Support
Community Support

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

PracticenameInput = IF(ISFILTERED(practice_master_test[practice_name]), SELECTEDVALUE(practice_master_test[practice_name]), "" )
but I can't code into this the value in the text slicer so I can ever get the user input to pass back to my UDF.
Does that make sense I have a record and I want to update it so this uses the existing value if I don't put in a value but if I do it doesn;t get passed back so the update fails.


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 ,

I wanted to follow up and confirm whether you’ve had a chance to review the information we provided. If you have any questions or need further clarification, please don’t hesitate to reach out.

As per community guidelines, if we don’t hear back from you, we will proceed to close the thread. If you are still facing the same issue, you are welcome to create a new thread, and we will be happy to assist you further.

We would be glad to support you.

 

Best regards,
Lakshmi Narayana

 

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

burakkaragoz
Community Champion
Community Champion

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:

  1. Make inputs optional in the UDF logic
    Inside your UDF, you can handle optional fields by checking for null or empty strings and applying default values or skipping logic accordingly. For example:
   WHERE (@PracticeCode IS NULL OR PracticeCode = @PracticeCode)
  1. Use a default space workaround
    If the UI requires a value to activate the button, you can pre-fill the slicer with a single space " " and then use TRIM() in your UDF to clean it up:
   SET @PracticeCode = TRIM(@PracticeCode)
  1. Custom validation logic
    If you're building the app in Power BI or another front-end, consider adding a custom validation layer that enables the button based on your own rules, not just field presence.

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.

    update_description_query = ("UPDATE [dbo].[practice_master_test] SET practice_name = COALESCE(NULLIF(?, ''), practice_name), practice_manager_code = COALESCE(NULLIF(?, ''), practice_manager_code), "
    "practice_group_code = COALESCE(NULLIF(?, ''), practice_group_code), region = COALESCE(NULLIF(?, ''), region), sub_region = COALESCE(NULLIF(?, ''), sub_region) "
    "where practice_code = ?")
    cursor.execute(update_description_query, practicename, practicemanagercode, practicegroupcode, regionI, subregion, practicecode)

however I can't get the powerbi to activate the button unless I put in a space in every field which we don't want.

2. default space, I haven't looked at this, am sure I can get a trim added however the issue is activating the button without adding a space to up to 40 text slicers

3. I am trying to get going from power bi not as an app.
thanks again though, any more ideas please share

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.