Forum Discussion
Anonymous
5 years agoNot applicable
Current Selections Box Date Hierarchy
Hello, I've been trying to show a filter selction in a "Current Selection" box I made. I can get it to work with a filter I use for state, but I cannot get it to work for a date hierarchy filter...
Fowmy
Super User
5 years agoAnonymous
Can you try the modified measure?
DateCreateSelection =
IF (
ISFILTERED ( 'tbl_Data'[DateCreated] ),
"State:" & UNICHAR ( 10 )
& CONCATENATEX ( DISTINCT ( 'tbl_Data'[DateCreated] ), Year('tbl_Data'[DateCreated]) & " - " & MONTH('tbl_Data'[DateCreated]), ", " ),
"No filter applied"
)
- Anonymous5 years agoNot applicable
This partially works, but I get a year and month for every record listed that matches year and month. I'm looking for a way to only show one month year, so it guess like:
DateCreateSelection =
IF (
ISFILTERED ( 'tbl_Data'[DateCreated] ),
"State:" & UNICHAR ( 10 )
& CONCATENATEX ( DISTINCT ( 'tbl_Data'[DateCreated] ), DISTINCT(Year('tbl_Data'[DateCreated] & " - " & Month('tbl_Data'[DateCreated])), ", " ),
"No filter applied"
)The issue is I cannot DISTINCT the year and month.
- v-easonf-msft5 years ago
Community Support
Hi, Anonymous
If it is convenient, can you share some saample data for further research?
Best Regards,
Community Support Team _ Eason