Display result in two different columns of crosstab by two date parameters.

Hi,


 


When i run my report by sending two different reports. If parameters date are same it displays same result in two different columns of crosstab or table. If dates are change it display 0. I want to display result of different dates in two different columns in crosstab or table.


 


Report Attached.

Regards,
Muhammad Waqas
Software Engineer
Avanza Solutions (Pvt.) Ltd.
Office # 14-B, Fakhri Trade Centre SR 6/10, Shahrah-e-Liaquat New Challi, Karachi-74200, Pakistan.
M   + 92 345 8928822
E    [email protected]
W   www.avanzasolutions.com

Comments

  • VirgilVirgil Administrator EM admin

    I can't run your report without the data and drivers but I think I can see what you are trying to do.  You should create a new Data Cube, but use a Date field from your CR Data Set to create a new Group Dimension... when you do this, an extra dialog pops up so you can select that you want it grouped by month, year, week, etc... then Count your COMP_TICKET_NUM like you were as a Summary Field in the Data Cube.


     


    Now, once you create a new Cross Tab, drag your date group into the column area, and your count into the center summary area.  This will display one new column for each period like month, for example.


     


    Use your parameters in the Data Set query to filter what the crosstab displays.


    Virgil Dodson
    OpenText Analytics Developer Community
    https://forums.opentext.com/forums/categories/analytics

  • VirgilVirgil Administrator EM admin

    After I posted this I read your original question and maybe have a different idea of what you are asking. If you want to decide, based on parameters, whether data should appear in column 1 or column 2, or more or a crosstab...that is also possible.  I would do this in the Data Set.  Create a new Computed Column.  Here you can create a new field in the expression builder with script that has access to the parameters.  You can check your parameters and leave a 1 or 2 in this field... Now, once you create a new crosstab, use the new field as a column dimension and you will get as many different columns as you have unique values in this new field.


    Virgil Dodson
    OpenText Analytics Developer Community
    https://forums.opentext.com/forums/categories/analytics

  • Can you make small example please? I don't understand what to write in script at computed column.


    Regards,
    Muhammad Waqas
    Software Engineer
    Avanza Solutions (Pvt.) Ltd.
    Office # 14-B, Fakhri Trade Centre SR 6/10, Shahrah-e-Liaquat New Challi, Karachi-74200, Pakistan.
    M   + 92 345 8928822
    E    [email protected]
    W   www.avanzasolutions.com

  • VirgilVirgil Administrator EM admin

    An example showing both approaches I mentioned above is included.  One crosstab is automatically split by month.. The other cross is split by a custom script in the Data Set's Computed Column area.  My script is just looking at a passed in date parameter but here you write whatever logic makes sense comparing as many date parameters as you want.


    Virgil Dodson
    OpenText Analytics Developer Community
    https://forums.opentext.com/forums/categories/analytics

  • I think you didn't understand my problem. Let me clear it more.


     


    I'm sending different dates from report parameters txtFirstDate and txtSecondDate. In first column of crosstab it should display measure of row["COMP_TICKET_NUM]" from date send by first paramter txtFirstDate. And in second column of crosstab it should display measure of same row["COMP_TICKET_NUM]" from different date send by second paramter txtSecondDate.


    Regards,
    Muhammad Waqas
    Software Engineer
    Avanza Solutions (Pvt.) Ltd.
    Office # 14-B, Fakhri Trade Centre SR 6/10, Shahrah-e-Liaquat New Challi, Karachi-74200, Pakistan.
    M   + 92 345 8928822
    E    [email protected]
    W   www.avanzasolutions.com

  • VirgilVirgil Administrator EM admin

    Just displaying 2 different dates in a crosstab is even easier, you just create a crosstab grouped by your date field, then set a filter on the crosstab that matches your two passed in dates.


     


    Virgil Dodson
    OpenText Analytics Developer Community
    https://forums.opentext.com/forums/categories/analytics

  • Solved. Thanks for the help  :)


    Regards,
    Muhammad Waqas
    Software Engineer
    Avanza Solutions (Pvt.) Ltd.
    Office # 14-B, Fakhri Trade Centre SR 6/10, Shahrah-e-Liaquat New Challi, Karachi-74200, Pakistan.
    M   + 92 345 8928822
    E    [email protected]
    W   www.avanzasolutions.com

Sign In or Register to comment.