Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello Community,
Is there a way to reference THE COLUMN NAME of the slicer (in the form "Table"[Column]) inside of a measure ?
The reason I need this is because I want to have a different TITLE for the slicer visual, which will differ, depending on the column selected. And in order to get that, I need to use a FORMULA (measure) in the TITLE section which handles the title output depending on the column. But I can't reference it in any way. Sadly there is no ISSELECTED for columns, and I need to find an alternative. And it also has to work without a selected value necessarily (so SELECTEDVALUE("Table"[Column]) command is also no good).
The title needs to be different then the column selected, because all these slicer columns have an abstract naming (eg name_1, name_2 ), used to avoid breaking the model upon online refreshing. The actual names are created by users and can be anything really and may be subject to change. This will be outputed by the dynamic title created from the measure, but this is the easier part.
So in other words I am looking for something like :
Measure Title = IF(...SELECTEDCOLUMNOFSLICER(Table[name_1]) = TRUE ... ,"value1",
IF(...SELECTEDCOLUMNOFSLICER(Table[name_2]) = TRUE ... ,"value2")
)
Thank you for your time on this,
Kind regards,
Solved! Go to Solution.
Hi @ioanik ,
1. the measure using the ISFILTERED expression doesn't work correctly, unless I actually choose a filter on the slicer visual, while I need it to work even if the user does not click on any value of the slicer.
For nothing selected, you can try to use:
IF ( ISBLANK ( SELECTEDVALUE ( 'Table'[Column] ) ), "xxx" )
2. when using the same measure as the TITLE formula, it does not even apply the naming conversion when filtered (meaning it doesn't recognise the FILTER applied).
This is by design.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you @Icey ,
Yes it makes sense to not work if its by design, but I don't understand why they implemented it like this. I will surely propose an idea to change this.
For now I am accepting this as a solution since there is no way around this.
Kind regards
Hello @ERD and thank you for your quick response,
Unfortunately, i've already tried ISFILTERED, but there are two issues.
1. the measure using the ISFILTERED expression doesn't work correctly, unless I actually choose a filter on the slicer visual, while I need it to work even if the user does not click on any value of the slicer.
2. when using the same measure as the TITLE formula, it does not even apply the naming conversion when filtered (meaning it doesn't recognise the FILTER applied).
Im snipping two visuals (a. a card containing the measure and b. a slicer with the measure as a header and the column cluster_c1 as the slicer attribute), illustrating this behavior. Please ignore the comments, I just have to make this work for the values showing and then everything will work accordingly.
Hi @ioanik ,
1. the measure using the ISFILTERED expression doesn't work correctly, unless I actually choose a filter on the slicer visual, while I need it to work even if the user does not click on any value of the slicer.
For nothing selected, you can try to use:
IF ( ISBLANK ( SELECTEDVALUE ( 'Table'[Column] ) ), "xxx" )
2. when using the same measure as the TITLE formula, it does not even apply the naming conversion when filtered (meaning it doesn't recognise the FILTER applied).
This is by design.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ioanik , you can use ISFILTERED function.
If this post helps, then please consider Accept it as the solution ✔️to help the other members find it more quickly.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.
Check out my latest demo report in the data story gallery.
Stand with Ukraine!
Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/
Thank you!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
22 | |
21 | |
19 | |
13 | |
12 |
User | Count |
---|---|
41 | |
32 | |
23 | |
22 | |
22 |