Forum Discussion
AvPowerBI
4 years agoPost Patron
Dynamically change column header
Hi, Is it possible to have the column header on a Table or Matrix Visualization to change its name if a filter is applied? So if the Field Invoiced is set to "N" then I want the Column header...
Pragati11
4 years agoSuper User
HI AvPowerBI ,
Yes it is possible by creating a measure using the values from a slicer and using this measure as a dynamic title of the visual.
You haven't given me anything on your data like what your data looks like.
If you see the small video below, my visual title is changing based on the selection from my slicer on the right.
I created a simple measure as follows:
Conditional Title =
VAR prodName = VALUES('Supermarket Sales'[Product line])
VAR occur = COUNTROWS(ALL('Supermarket Sales'[Product line])) = COUNTROWS(prodName)
RETURN
IF(
occur, "Summary of Products",
CONCATENATE("Summary of Product Line: ",
CONCATENATEX(
prodName,
'Supermarket Sales'[Product line],
", "
)
)
)
The used this measure in the title area of the visual by clicking on the "fx" sign:
This opens a new window to select the meausre that is created above to dynamically change the title of the visual:
Thanks,
Pragati