Forum Discussion
Slicer Selected Values Label to text
- 3 years ago
use ISFILTERED, HASONEFILTER, FILTERS and VALUES to figure out if the columns are filtered. Then concatenate the results accordingly.
Note that there is a difference between "nothing filtered yet" and "nothing filtered as result of the filters being cleared". You could call that a bug, or a feature.
- Anonymous3 years ago
Many thanks, I was using the method below but I was sure there is probably a better way to do it. I will follow your recommendations.
dateLabel = Var year_ = SELECTEDVALUE(cm[ReportFY],BLANK()) Var quarter_ = SELECTEDVALUE(cm[ReportQ],BLANK()) Var month_ = SELECTEDVALUE(cm[monthLabelShort],BLANK()) return SWITCH( TRUE(), quarter_="","Selected Date: " & CONCATENATE(year_," (FY) "), month_="","Selected Date: " & CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ)")), "Selected Date: " & CONCATENATE(CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ) + ")),CONCATENATE(month_," (M)") ))
use ISFILTERED, HASONEFILTER, FILTERS and VALUES to figure out if the columns are filtered. Then concatenate the results accordingly.
Note that there is a difference between "nothing filtered yet" and "nothing filtered as result of the filters being cleared". You could call that a bug, or a feature.
- Anonymous3 years agoNot applicable
Many thanks, I was using the method below but I was sure there is probably a better way to do it. I will follow your recommendations.
dateLabel = Var year_ = SELECTEDVALUE(cm[ReportFY],BLANK()) Var quarter_ = SELECTEDVALUE(cm[ReportQ],BLANK()) Var month_ = SELECTEDVALUE(cm[monthLabelShort],BLANK()) return SWITCH( TRUE(), quarter_="","Selected Date: " & CONCATENATE(year_," (FY) "), month_="","Selected Date: " & CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ)")), "Selected Date: " & CONCATENATE(CONCATENATE(CONCATENATE(year_," (FY) + "),CONCATENATE(quarter_," (FQ) + ")),CONCATENATE(month_," (M)") ))