Date Part Filter Problem

jim fuller shared this question 5 years ago
Answered

I have a postgres table with a date column in my data set (mm/dd/yyyy). I"ve added 3 columns to a view by copying this date field. I've applied the Date Part format on these fields in the view and formatted as:

Year, Month, Quarter

When I use these fields in a Report Filter, I get duplicate values in the selection list the filter creates as shown in the attachment, I'm guessing because the underling date is driving the list in the filter, but display by the format.

This is odd, since the field displays the correct format. Is it possible to filter on the desired format while removing dups in the list?

Replies (3)

photo
1

Hi Jim,

yes it is.

What's going on here is that you are asking Yellowfin to select all of the values for that date field, and then once all of the values have been loaded then Yellowfin will apply the format that you have specified to each value. In your case the formatting change is to show just the month for each of those dates, but it's just a cosmetic change - just the same as getting Yellowfin to apply a red font to each date value.

I think you will need to change the fundamental value at the view level rather than just a cosmetic change, please try using the "Date Function" in the View Builder's Prepare screen:

/MHPG3xEbvPK8UuWrPyawSpFKpdP8ZEePD9P8AzQhEGNWIv9oAAAAASUVORK5CYIIA


/A4rus1INthLgAAAAAElFTkSuQmCCAA==

and let me know if that does the job for you.

regards,

David

photo
1

Good catch. A field format is not changing the underlying value that the filter uses to build the list - thanks for the reminder.

I'll use the appropriate Date Function.

This solves the issue. Please close the ticket.

photo
1

great, thanks for letting me know!

Leave a Comment
 
Attach a file