Skip to Content
author's profile photo Former Member
Former Member

UNX filter - current year

Getting this weird error. Want pass the current year to this 'RptYr' field and create a universe filter.

UNX 4.1

Current Year.png (15.2 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Aug 15, 2016 at 11:36 PM

    which is the backend database?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 16, 2016 at 03:58 AM

    Hello Vishal,

    For HANA to get the current date you need to use now() and to extract year from it you can use Component() function.

    The Syntax would be Component(now(),1) this would give you four character string of year extracted from current date.

    Later you can use it to compare the results and create a filter object.

    Regards

    Niraj

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 17, 2016 at 06:59 PM

    What is the formula you have?.

    Did you tried this?.

    Create a dimension on Current_date using current_date (HANA based expression)

    Then filter:

    extract(year from "_SYS_BIC"."rptyear") = extract(year from @Select(Current_date))

    Thanks,

    Jothi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.