The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I want the title of a slicer to change depending on if something is selected or not.
For example, a slicer with a vertical list of countries.
If there is not country selected, the Slicer title is just: "Country"
If there is a country selected, the Slicer title changes to "Country*" with an asterisk.
I have put this piece of code into the Slicer title field (using the fx button).
_countrySlicerTitle = VAR SelectedCountry = SELECTEDVALUE(data[Country]) RETURN IF(ISBLANK(SelectedCountry), "Country", "Country *")
However, when I select a country in the slicer, nothing happens to the title. It stays on "Country".
If I put the Dax title into a separate card, it updates when something is selected.
What am I doing wrong? Or is this a bug?
Hi @amitchandak ,thanks for the quick reply, I'll add further.
Hi @soliverc ,
Regarding your question, I conducted a test and found it to be unattainable.Because in the chart title conditional formatting, the 'SELECTEDVALUE' can only return when it's been filtered but not been highlighted.I created a second slicer for the title to take effect.
You may be able to achieve your needs indirectly by combining card visualization objects.
Measure = IF(ISFILTERED('Table'[Country]) = FALSE(),"Country","Country*")
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
27 |
User | Count |
---|---|
181 | |
83 | |
68 | |
49 | |
46 |