Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have below dimension :-
This field has data starting from 2010 till Nov 2021. I am using this field as filter and also as a dimension in one of the charts.
I want to show the data only for current year i.e Jan 2021 till max . How can i restrict this dimension to show data only for current year ? Can anyone please help me ?
Thanks in advance
Hello,
In your use case scenario I would suggest using Filter pane with expression similar to "=If(WildMatch(DATE_FIELD, '*2021'), FIELD)". This expression will only show you the values of FIELD, where DATE_FIELD ends with "2021". For example dates such as "10/25/2021" or "01/12/2021" etc. If you would like to make it more scalable, you can add the "Year(Today())" part in your expression that will make sure that always the current year is used, without you needed to update the value manually each year. So the new expression looks like "=If(WildMatch(DATE_FIELD, '*' & Year(Today())), FIELD)". Below you will find the results of my testings:
The expression "DATE_FIELD" gives me:
The expression "=If(WildMatch(DATE_FIELD, '*' & Year(Today())), DATE_FIELD)" gives me:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate further in details
Hello,
In your use case scenario I would suggest using Filter pane with expression similar to "=If(WildMatch(DATE_FIELD, '*2021'), FIELD)". This expression will only show you the values of FIELD, where DATE_FIELD ends with "2021". For example dates such as "10/25/2021" or "01/12/2021" etc. If you would like to make it more scalable, you can add the "Year(Today())" part in your expression that will make sure that always the current year is used, without you needed to update the value manually each year. So the new expression looks like "=If(WildMatch(DATE_FIELD, '*' & Year(Today())), FIELD)". Below you will find the results of my testings:
The expression "DATE_FIELD" gives me:
The expression "=If(WildMatch(DATE_FIELD, '*' & Year(Today())), DATE_FIELD)" gives me:
I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate further in details