Counting..:(

crystalllll
edited February 11, 2022 in Analytics #1
Hi Genius,

I have a column of DATES like
10/3/08
10/3/08
10/3/08
11/03/08
11/03/08
11/03/08
11/03/08
12/03/08
13/03/08 (today's date)
13/03/08 (today's date)
13/03/08 (today's date)
13/03/08 (today's date)

I would like to count this column WHERE the date is = today's date (which means 13/03/08 from above and it should return 4) how can i do that??? PLEASE PLEASE HELP :)

Comments

  • averma
    edited December 31, 1969 #2
    Hi crystalllll:

    It should be very easy to do. You will need to define a global variable and increment its value if the date matches. I am attaching a design that counts the selected date and prints it at the end of the report.

    Ashwini
    Warning No formatter is installed for the format ipb
  • crystalllll
    edited December 31, 1969 #3
    THANK YOU SOOO SOOO MUCH!!!!!! much appreciated!!:) :)
  • crystalllll
    edited December 31, 1969 #4
    OO Do i need a specific version of Birt to do that? I only have 2.1 is that OK? when i Open you sample..it say xml error...what do i have to configure in order to view it?? PLEASE thanks :)
  • averma
    edited December 31, 1969 #5
    crystalllll:

    That report design was for version 2.2.2. I have recreated a similar design for version 2.1.3, hope this will work for you.

    Ashwini
    Warning No formatter is installed for the format ipb
  • crystalllll
    edited December 31, 1969 #6
    THanks alot again, i can open and view it now, However i can see you are defining a value gl.variable...but where is that gl.variable referring to? i mean where is it getting the gl.variable value.? thanks...Sorry if it cause too much of your time :) thanks thanks
  • averma
    edited December 31, 1969 #7
    crystalllll:
    The global variable(gbl_Counter) is defined in the table. Select the table and then the script tab, varible is initialized in the onPrepare method and then incremented based on the matching condition in the onCreate method of the detail row(you will need to select the detail row and then script tab). The variable value is accessed in the footer of the table in the text element to print out the number of matching dates. Hope this helps

    Ashwini
    Warning No formatter is installed for the format ipb