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

How should I customize date in Input Control Webi?

Dear Experts,

I'm facing problem that I need to customize date field in input control.

I have a sale date field that can select from m/dd/yyyy to m/dd/yyyy.

I need to customize it as image below.

Please help me if anyone have any suggestions.

Best regards,

Chenna

1.png (23.1 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2014 at 11:26 AM

    Hi Chenna,

    Create 4 Variables

    Dimension Variable

    Name : ToValue

    Formula: =""

    Measure Variable

    Name : DynamicValue

    Formula:

    =If [ToValue]="Last 3 Days" Then RelativeDate([UserContrtolDate];-3)

    ElseIf [ToValue]="Last Day" Then RelativeDate([UserContrtolDate];-1)

    ElseIf [ToValue]="Last Week" Then RelativeDate([UserContrtolDate];-7)

    ElseIf [ToValue]="Last Month" Then ToDate(FormatNumber(MonthNumberOfYear([UserContrtolDate])-1;"##") +"/"+FormatNumber(DayNumberOfMonth([UserContrtolDate]);"##")+"/"+ FormatNumber(Year([UserContrtolDate]);"####");"MM/dd/yyyy")

    ElseIf [ToValue]="Last 3 Months" Then ToDate(FormatNumber(MonthNumberOfYear([UserContrtolDate])-3;"##") +"/"+FormatNumber(DayNumberOfMonth([UserContrtolDate]);"##")+"/"+FormatNumber(Year([UserContrtolDate]);"####");"MM/dd/yyyy")

    ElseIf [ToValue]="Last 6 Months" Then ToDate(FormatNumber(MonthNumberOfYear([UserContrtolDate])-6;"##") +"/"+FormatNumber(DayNumberOfMonth([UserContrtolDate]);"##")+"/"+FormatNumber(Year([UserContrtolDate]);"####");"MM/dd/yyyy")

    ElseIf [ToValue]="Last Year" Then ToDate(FormatNumber(MonthNumberOfYear([UserContrtolDate]);"##") +"/"+FormatNumber(DayNumberOfMonth([UserContrtolDate]);"##")+"/"+FormatNumber(Year([UserContrtolDate])-1;"####");"MM/dd/yyyy")

    Measure Variable

    Name : UserContrtolDate

    Formula:

    =ToDate(ReportFilter([Calendar day]);"M/d/yyyy hh:mm:ss A")

    Measure Variable

    Name : SalesValue

    Formula:

    =Sum([Total Sales Value]) Where ([Calendar day] >= [DynamicValue] And [Calendar day]<=[UserContrtolDate])

    Create 2 Input Control

    1. Calendar Day (To Value)

    2. From Value

    Step 1: Click Radio Buttons

    Step 2: In Input Control Properties -> List of Values

    Step 3: Click Custom (To create custom Values)

    Last Day

    Last 3 Days

    Last Week

    Last Month

    Last 3 Months

    Last 6 Months

    Create a Vertical Table and drag the variables and check

    Input Values:

    DynamicValue (From Value)

    UserContrtolDate (To Value)

    Output Values:

    SalesValue

    I believe, I have helped you to achieve your goal.😊

    --Raji. S

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 28, 2014 at 05:38 AM

    Hello Chenna,

    create a prompt value and customize date.

    Example :-

    SELECT 'Last 7 Days' AS Date_Range,

    CONVERT(smalldatetime, { fn curDATE() }) - 6 AS Begin_Date,

    CONVERT(smalldatetime, { fn curDATE() }) AS End_Date

    FROM dbo.abc

    Regards,

    Hemant Jha

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 28, 2014 at 10:47 AM

    Hi Chenna ,

    Instead of last 3 months and 6 months 1 year , you can have last 90 days ,last 180 Days ,Last 365 days for ease only 😊

    Create a variable

    Days

    =daysbetween([Date From];[Date To])

    which gives numeric values

    then write another variable

    Create a variable with "Last Day" as value

    To Date =Last Day

    Then add custom values "Last 3 Days"...."All"

    Then create different measure variables for different buckets

    Ex: V_lastday

    =[Amount] where ([Days]=1)

    V_last 3 Day

    =[Amount] where ([Days]<=3)

    and so on

    V_All

    =[Amount] where ([Days]>=0)

    then write another variable to give destined value

    if([To Date]="Last Day";[V_lastday];[To Date]="Last 3 Days";[V_last 3 Day];...;[To Date]="All";[V_All]))))))))

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 28, 2014 at 03:45 AM

    You can not customize a date object like this. You need to have a separate object with such values. what is the backend?

    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.