Dynamic Text Box


#1

Hi :slight_smile:

Is it possible to create a dynamic Text Box object in Power BI ? And just to clarify - I am not asking about well-known dynamic labels, dynamic text etc., but a Text Box that visualize only after a certain selection of other parameters (slicers) and respectively not visualize in the absence of such selection.

Thanks
Plamen


#2

Plamen, the only solution I can think of is to write a measure, using “ISFILTERED” that returns your message if ANY filter is applied to the slicer, but returns nothing if no filters are applied.

EXAMPLE: Table is NAMES, Slicer is on Field FIRST

Text Measure = IF( ISFILTERED( NAMES[FIRST] ), “The table is filtered”, “”)

Then I put that into a Card Visual, turning off the category label. The Card is technically there, but if the slicer has no filters then nothing shows up.

Will this work?


#3

Thanks for that suggestion. The end idea is to have a text box with narratives each month only for some of the slicer selection and none for another, so the Card will not work, but the workaround I am gonna to try is exactly with if(isfiltered…), returning blank if not selected. Thanks :slight_smile:


#4

Or maybe with custom visual component


#5

You could modify it to only return text when a particular slicer selection is shown, using SELECTEDVALUE

Text Measure = IF( SELECTEDVALUE( NAMES[FIRST]) = “Heather”, “Value is Heather”, “”)

Obviously, it would get more complex the more different values you want to show.